From 6039eb05ba6d82ef56f2868c96654c552d117bf9 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Wed, 7 Feb 2018 20:04:46 -0500 Subject: sdl: remove non-rockbox drivers We never use any of these other drivers, so having them around just takes up space. Change-Id: Iced812162df1fef3fd55522b7e700acb6c3bcd41 --- apps/plugins/sdl/src/video/Xext/README | 10 - apps/plugins/sdl/src/video/Xext/XME/xme.c | 410 --- .../plugins/sdl/src/video/Xext/Xinerama/Xinerama.c | 324 --- apps/plugins/sdl/src/video/Xext/Xv/Xv.c | 1151 -------- apps/plugins/sdl/src/video/Xext/Xv/Xvlibint.h | 81 - apps/plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA.c | 721 ----- .../plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA2.c | 993 ------- .../plugins/sdl/src/video/Xext/Xxf86vm/XF86VMode.c | 1226 -------- apps/plugins/sdl/src/video/Xext/extensions/Xext.h | 50 - .../sdl/src/video/Xext/extensions/Xinerama.h | 46 - apps/plugins/sdl/src/video/Xext/extensions/Xv.h | 129 - apps/plugins/sdl/src/video/Xext/extensions/Xvlib.h | 433 --- .../sdl/src/video/Xext/extensions/Xvproto.h | 604 ---- .../sdl/src/video/Xext/extensions/extutil.h | 226 -- .../sdl/src/video/Xext/extensions/panoramiXext.h | 52 - .../sdl/src/video/Xext/extensions/panoramiXproto.h | 192 -- .../sdl/src/video/Xext/extensions/xf86dga.h | 265 -- .../sdl/src/video/Xext/extensions/xf86dga1.h | 169 -- .../sdl/src/video/Xext/extensions/xf86dga1str.h | 194 -- .../sdl/src/video/Xext/extensions/xf86dgastr.h | 344 --- .../sdl/src/video/Xext/extensions/xf86vmode.h | 314 -- .../sdl/src/video/Xext/extensions/xf86vmstr.h | 546 ---- apps/plugins/sdl/src/video/Xext/extensions/xme.h | 45 - apps/plugins/sdl/src/video/aalib/SDL_aaevents.c | 202 -- apps/plugins/sdl/src/video/aalib/SDL_aaevents_c.h | 35 - apps/plugins/sdl/src/video/aalib/SDL_aamouse.c | 35 - apps/plugins/sdl/src/video/aalib/SDL_aamouse_c.h | 26 - apps/plugins/sdl/src/video/aalib/SDL_aavideo.c | 388 --- apps/plugins/sdl/src/video/aalib/SDL_aavideo.h | 66 - .../sdl/src/video/ataricommon/SDL_ataric2p.S | 452 --- .../sdl/src/video/ataricommon/SDL_ataric2p_s.h | 75 - .../sdl/src/video/ataricommon/SDL_ataridevmouse.c | 159 -- .../src/video/ataricommon/SDL_ataridevmouse_c.h | 42 - .../sdl/src/video/ataricommon/SDL_atarieddi.S | 42 - .../sdl/src/video/ataricommon/SDL_atarieddi_s.h | 54 - .../sdl/src/video/ataricommon/SDL_atarievents.c | 234 -- .../sdl/src/video/ataricommon/SDL_atarievents_c.h | 52 - .../sdl/src/video/ataricommon/SDL_atarigl.c | 1086 ------- .../sdl/src/video/ataricommon/SDL_atarigl_c.h | 109 - .../sdl/src/video/ataricommon/SDL_atarikeys.h | 140 - .../sdl/src/video/ataricommon/SDL_atarimxalloc.c | 52 - .../sdl/src/video/ataricommon/SDL_atarimxalloc_c.h | 37 - .../sdl/src/video/ataricommon/SDL_atarisuper.h | 61 - .../sdl/src/video/ataricommon/SDL_biosevents.c | 131 - .../sdl/src/video/ataricommon/SDL_biosevents_c.h | 42 - .../sdl/src/video/ataricommon/SDL_gemdosevents.c | 132 - .../sdl/src/video/ataricommon/SDL_gemdosevents_c.h | 42 - .../sdl/src/video/ataricommon/SDL_ikbdevents.c | 124 - .../sdl/src/video/ataricommon/SDL_ikbdevents_c.h | 42 - .../sdl/src/video/ataricommon/SDL_ikbdinterrupt.S | 404 --- .../src/video/ataricommon/SDL_ikbdinterrupt_s.h | 61 - .../sdl/src/video/ataricommon/SDL_xbiosevents.c | 155 - .../sdl/src/video/ataricommon/SDL_xbiosevents_c.h | 48 - .../sdl/src/video/ataricommon/SDL_xbiosinterrupt.S | 212 -- .../src/video/ataricommon/SDL_xbiosinterrupt_s.h | 52 - apps/plugins/sdl/src/video/bwindow/SDL_BView.h | 116 - apps/plugins/sdl/src/video/bwindow/SDL_BWin.h | 290 -- apps/plugins/sdl/src/video/bwindow/SDL_lowvideo.h | 58 - .../plugins/sdl/src/video/bwindow/SDL_sysevents.cc | 415 --- .../sdl/src/video/bwindow/SDL_sysevents_c.h | 31 - apps/plugins/sdl/src/video/bwindow/SDL_sysmouse.cc | 153 - .../plugins/sdl/src/video/bwindow/SDL_sysmouse_c.h | 33 - apps/plugins/sdl/src/video/bwindow/SDL_sysvideo.cc | 841 ------ apps/plugins/sdl/src/video/bwindow/SDL_syswm.cc | 92 - apps/plugins/sdl/src/video/bwindow/SDL_syswm_c.h | 32 - apps/plugins/sdl/src/video/bwindow/SDL_sysyuv.cc | 314 -- apps/plugins/sdl/src/video/bwindow/SDL_sysyuv.h | 73 - apps/plugins/sdl/src/video/caca/SDL_cacaevents.c | 101 - apps/plugins/sdl/src/video/caca/SDL_cacaevents_c.h | 35 - apps/plugins/sdl/src/video/caca/SDL_cacavideo.c | 304 -- apps/plugins/sdl/src/video/caca/SDL_cacavideo.h | 76 - apps/plugins/sdl/src/video/dc/SDL_dcevents.c | 152 - apps/plugins/sdl/src/video/dc/SDL_dcevents_c.h | 33 - apps/plugins/sdl/src/video/dc/SDL_dcmouse.c | 35 - apps/plugins/sdl/src/video/dc/SDL_dcmouse_c.h | 26 - apps/plugins/sdl/src/video/dc/SDL_dcvideo.c | 445 --- apps/plugins/sdl/src/video/dc/SDL_dcvideo.h | 42 - apps/plugins/sdl/src/video/dga/SDL_dgaevents.c | 163 -- apps/plugins/sdl/src/video/dga/SDL_dgaevents_c.h | 28 - apps/plugins/sdl/src/video/dga/SDL_dgamouse.c | 35 - apps/plugins/sdl/src/video/dga/SDL_dgamouse_c.h | 26 - apps/plugins/sdl/src/video/dga/SDL_dgavideo.c | 1101 ------- apps/plugins/sdl/src/video/dga/SDL_dgavideo.h | 124 - .../sdl/src/video/directfb/SDL_DirectFB_events.c | 219 -- .../sdl/src/video/directfb/SDL_DirectFB_events.h | 29 - .../sdl/src/video/directfb/SDL_DirectFB_keys.h | 135 - .../sdl/src/video/directfb/SDL_DirectFB_video.c | 1171 -------- .../sdl/src/video/directfb/SDL_DirectFB_video.h | 62 - .../sdl/src/video/directfb/SDL_DirectFB_yuv.c | 290 -- .../sdl/src/video/directfb/SDL_DirectFB_yuv.h | 38 - apps/plugins/sdl/src/video/fbcon/3dfx_mmio.h | 56 - apps/plugins/sdl/src/video/fbcon/3dfx_regs.h | 83 - apps/plugins/sdl/src/video/fbcon/SDL_fb3dfx.c | 215 -- apps/plugins/sdl/src/video/fbcon/SDL_fb3dfx.h | 29 - apps/plugins/sdl/src/video/fbcon/SDL_fbelo.c | 442 --- apps/plugins/sdl/src/video/fbcon/SDL_fbelo.h | 55 - apps/plugins/sdl/src/video/fbcon/SDL_fbevents.c | 1254 -------- apps/plugins/sdl/src/video/fbcon/SDL_fbevents_c.h | 38 - apps/plugins/sdl/src/video/fbcon/SDL_fbkeys.h | 139 - apps/plugins/sdl/src/video/fbcon/SDL_fbmatrox.c | 280 -- apps/plugins/sdl/src/video/fbcon/SDL_fbmatrox.h | 29 - apps/plugins/sdl/src/video/fbcon/SDL_fbmouse.c | 33 - apps/plugins/sdl/src/video/fbcon/SDL_fbmouse_c.h | 26 - apps/plugins/sdl/src/video/fbcon/SDL_fbriva.c | 222 -- apps/plugins/sdl/src/video/fbcon/SDL_fbriva.h | 36 - apps/plugins/sdl/src/video/fbcon/SDL_fbvideo.c | 1982 ------------- apps/plugins/sdl/src/video/fbcon/SDL_fbvideo.h | 200 -- apps/plugins/sdl/src/video/fbcon/matrox_mmio.h | 51 - apps/plugins/sdl/src/video/fbcon/matrox_regs.h | 376 --- apps/plugins/sdl/src/video/fbcon/riva_mmio.h | 449 --- apps/plugins/sdl/src/video/fbcon/riva_regs.h | 43 - apps/plugins/sdl/src/video/gapi/SDL_gapivideo.c | 1287 --------- apps/plugins/sdl/src/video/gapi/SDL_gapivideo.h | 160 -- apps/plugins/sdl/src/video/gem/SDL_gemevents.c | 375 --- apps/plugins/sdl/src/video/gem/SDL_gemevents_c.h | 33 - apps/plugins/sdl/src/video/gem/SDL_gemmouse.c | 205 -- apps/plugins/sdl/src/video/gem/SDL_gemmouse_c.h | 34 - apps/plugins/sdl/src/video/gem/SDL_gemvideo.c | 1337 --------- apps/plugins/sdl/src/video/gem/SDL_gemvideo.h | 191 -- apps/plugins/sdl/src/video/gem/SDL_gemwm.c | 116 - apps/plugins/sdl/src/video/gem/SDL_gemwm_c.h | 37 - apps/plugins/sdl/src/video/ggi/SDL_ggievents.c | 264 -- apps/plugins/sdl/src/video/ggi/SDL_ggievents_c.h | 29 - apps/plugins/sdl/src/video/ggi/SDL_ggikeys.h | 135 - apps/plugins/sdl/src/video/ggi/SDL_ggimouse.c | 32 - apps/plugins/sdl/src/video/ggi/SDL_ggimouse_c.h | 26 - apps/plugins/sdl/src/video/ggi/SDL_ggivideo.c | 378 --- apps/plugins/sdl/src/video/ggi/SDL_ggivideo.h | 48 - apps/plugins/sdl/src/video/ipod/SDL_ipodvideo.c | 733 ----- apps/plugins/sdl/src/video/ipod/SDL_ipodvideo.h | 38 - .../plugins/sdl/src/video/maccommon/SDL_lowvideo.h | 102 - .../sdl/src/video/maccommon/SDL_macevents.c | 746 ----- .../sdl/src/video/maccommon/SDL_macevents_c.h | 32 - apps/plugins/sdl/src/video/maccommon/SDL_macgl.c | 197 -- apps/plugins/sdl/src/video/maccommon/SDL_macgl_c.h | 47 - apps/plugins/sdl/src/video/maccommon/SDL_mackeys.h | 140 - .../plugins/sdl/src/video/maccommon/SDL_macmouse.c | 129 - .../sdl/src/video/maccommon/SDL_macmouse_c.h | 34 - apps/plugins/sdl/src/video/maccommon/SDL_macwm.c | 442 --- apps/plugins/sdl/src/video/maccommon/SDL_macwm_c.h | 41 - apps/plugins/sdl/src/video/macdsp/SDL_dspvideo.c | 1422 --------- apps/plugins/sdl/src/video/macdsp/SDL_dspvideo.h | 54 - apps/plugins/sdl/src/video/macrom/SDL_romvideo.c | 745 ----- apps/plugins/sdl/src/video/macrom/SDL_romvideo.h | 29 - apps/plugins/sdl/src/video/nanox/SDL_nxevents.c | 382 --- apps/plugins/sdl/src/video/nanox/SDL_nxevents_c.h | 32 - apps/plugins/sdl/src/video/nanox/SDL_nximage.c | 230 -- apps/plugins/sdl/src/video/nanox/SDL_nximage_c.h | 35 - apps/plugins/sdl/src/video/nanox/SDL_nxmodes.c | 84 - apps/plugins/sdl/src/video/nanox/SDL_nxmodes_c.h | 34 - apps/plugins/sdl/src/video/nanox/SDL_nxmouse.c | 79 - apps/plugins/sdl/src/video/nanox/SDL_nxmouse_c.h | 29 - apps/plugins/sdl/src/video/nanox/SDL_nxvideo.c | 544 ---- apps/plugins/sdl/src/video/nanox/SDL_nxvideo.h | 96 - apps/plugins/sdl/src/video/nanox/SDL_nxwm.c | 61 - apps/plugins/sdl/src/video/nanox/SDL_nxwm_c.h | 32 - apps/plugins/sdl/src/video/nds/SDL_ndsevents.c | 83 - apps/plugins/sdl/src/video/nds/SDL_ndsevents_c.h | 51 - apps/plugins/sdl/src/video/nds/SDL_ndsmouse.c | 34 - apps/plugins/sdl/src/video/nds/SDL_ndsmouse_c.h | 26 - apps/plugins/sdl/src/video/nds/SDL_ndsvideo.c | 500 ---- apps/plugins/sdl/src/video/nds/SDL_ndsvideo.h | 61 - apps/plugins/sdl/src/video/os2fslib/SDL_os2fslib.c | 3018 -------------------- apps/plugins/sdl/src/video/os2fslib/SDL_os2fslib.h | 71 - apps/plugins/sdl/src/video/os2fslib/SDL_vkeys.h | 74 - apps/plugins/sdl/src/video/photon/SDL_ph_events.c | 624 ---- .../plugins/sdl/src/video/photon/SDL_ph_events_c.h | 37 - apps/plugins/sdl/src/video/photon/SDL_ph_gl.c | 406 --- apps/plugins/sdl/src/video/photon/SDL_ph_gl.h | 41 - apps/plugins/sdl/src/video/photon/SDL_ph_image.c | 1059 ------- apps/plugins/sdl/src/video/photon/SDL_ph_image_c.h | 59 - apps/plugins/sdl/src/video/photon/SDL_ph_modes.c | 390 --- apps/plugins/sdl/src/video/photon/SDL_ph_modes_c.h | 43 - apps/plugins/sdl/src/video/photon/SDL_ph_mouse.c | 220 -- apps/plugins/sdl/src/video/photon/SDL_ph_mouse_c.h | 39 - apps/plugins/sdl/src/video/photon/SDL_ph_video.c | 648 ----- apps/plugins/sdl/src/video/photon/SDL_ph_video.h | 157 - apps/plugins/sdl/src/video/photon/SDL_ph_wm.c | 118 - apps/plugins/sdl/src/video/photon/SDL_ph_wm_c.h | 37 - apps/plugins/sdl/src/video/photon/SDL_phyuv.c | 504 ---- apps/plugins/sdl/src/video/photon/SDL_phyuv_c.h | 62 - apps/plugins/sdl/src/video/picogui/SDL_pgevents.c | 117 - .../plugins/sdl/src/video/picogui/SDL_pgevents_c.h | 37 - apps/plugins/sdl/src/video/picogui/SDL_pgvideo.c | 364 --- apps/plugins/sdl/src/video/picogui/SDL_pgvideo.h | 50 - apps/plugins/sdl/src/video/ps2gs/SDL_gsevents.c | 977 ------- apps/plugins/sdl/src/video/ps2gs/SDL_gsevents_c.h | 38 - apps/plugins/sdl/src/video/ps2gs/SDL_gskeys.h | 139 - apps/plugins/sdl/src/video/ps2gs/SDL_gsmouse.c | 146 - apps/plugins/sdl/src/video/ps2gs/SDL_gsmouse_c.h | 37 - apps/plugins/sdl/src/video/ps2gs/SDL_gsvideo.c | 689 ----- apps/plugins/sdl/src/video/ps2gs/SDL_gsvideo.h | 95 - apps/plugins/sdl/src/video/ps2gs/SDL_gsyuv.c | 461 --- apps/plugins/sdl/src/video/ps2gs/SDL_gsyuv_c.h | 37 - apps/plugins/sdl/src/video/ps3/SDL_ps3events.c | 44 - apps/plugins/sdl/src/video/ps3/SDL_ps3events_c.h | 41 - apps/plugins/sdl/src/video/ps3/SDL_ps3video.c | 621 ---- apps/plugins/sdl/src/video/ps3/SDL_ps3video.h | 165 -- apps/plugins/sdl/src/video/ps3/SDL_ps3yuv.c | 340 --- apps/plugins/sdl/src/video/ps3/SDL_ps3yuv_c.h | 44 - apps/plugins/sdl/src/video/ps3/spulibs/Makefile | 83 - .../sdl/src/video/ps3/spulibs/bilin_scaler.c | 2050 ------------- apps/plugins/sdl/src/video/ps3/spulibs/fb_writer.c | 193 -- .../plugins/sdl/src/video/ps3/spulibs/spu_common.h | 108 - .../sdl/src/video/ps3/spulibs/yuv2rgb_converter.c | 629 ---- apps/plugins/sdl/src/video/qtopia/SDL_QPEApp.cc | 63 - apps/plugins/sdl/src/video/qtopia/SDL_QPEApp.h | 33 - apps/plugins/sdl/src/video/qtopia/SDL_QWin.cc | 527 ---- apps/plugins/sdl/src/video/qtopia/SDL_QWin.h | 110 - apps/plugins/sdl/src/video/qtopia/SDL_lowvideo.h | 65 - apps/plugins/sdl/src/video/qtopia/SDL_sysevents.cc | 269 -- .../plugins/sdl/src/video/qtopia/SDL_sysevents_c.h | 31 - apps/plugins/sdl/src/video/qtopia/SDL_sysmouse.cc | 56 - apps/plugins/sdl/src/video/qtopia/SDL_sysmouse_c.h | 32 - apps/plugins/sdl/src/video/qtopia/SDL_sysvideo.cc | 403 --- apps/plugins/sdl/src/video/qtopia/SDL_syswm.cc | 35 - apps/plugins/sdl/src/video/qtopia/SDL_syswm_c.h | 28 - apps/plugins/sdl/src/video/quartz/CGS.h | 84 - .../sdl/src/video/quartz/SDL_QuartzEvents.m | 1063 ------- apps/plugins/sdl/src/video/quartz/SDL_QuartzGL.m | 292 -- apps/plugins/sdl/src/video/quartz/SDL_QuartzKeys.h | 146 - .../plugins/sdl/src/video/quartz/SDL_QuartzVideo.h | 229 -- .../plugins/sdl/src/video/quartz/SDL_QuartzVideo.m | 1689 ----------- apps/plugins/sdl/src/video/quartz/SDL_QuartzWM.h | 27 - apps/plugins/sdl/src/video/quartz/SDL_QuartzWM.m | 444 --- .../sdl/src/video/quartz/SDL_QuartzWindow.h | 51 - .../sdl/src/video/quartz/SDL_QuartzWindow.m | 231 -- apps/plugins/sdl/src/video/riscos/SDL_riscosASM.S | 116 - .../src/video/riscos/SDL_riscosFullScreenVideo.c | 777 ----- .../sdl/src/video/riscos/SDL_riscosevents.c | 549 ---- .../sdl/src/video/riscos/SDL_riscosevents_c.h | 34 - .../plugins/sdl/src/video/riscos/SDL_riscosmouse.c | 371 --- .../sdl/src/video/riscos/SDL_riscosmouse_c.h | 44 - .../sdl/src/video/riscos/SDL_riscossprite.c | 265 -- apps/plugins/sdl/src/video/riscos/SDL_riscostask.c | 350 --- apps/plugins/sdl/src/video/riscos/SDL_riscostask.h | 39 - .../plugins/sdl/src/video/riscos/SDL_riscosvideo.c | 316 -- .../plugins/sdl/src/video/riscos/SDL_riscosvideo.h | 62 - apps/plugins/sdl/src/video/riscos/SDL_wimppoll.c | 330 --- apps/plugins/sdl/src/video/riscos/SDL_wimpvideo.c | 501 ---- apps/plugins/sdl/src/video/svga/SDL_svgaevents.c | 412 --- apps/plugins/sdl/src/video/svga/SDL_svgaevents_c.h | 35 - apps/plugins/sdl/src/video/svga/SDL_svgamouse.c | 33 - apps/plugins/sdl/src/video/svga/SDL_svgamouse_c.h | 26 - apps/plugins/sdl/src/video/svga/SDL_svgavideo.c | 584 ---- apps/plugins/sdl/src/video/svga/SDL_svgavideo.h | 58 - .../sdl/src/video/symbian/EKA1/SDL_epocevents.cpp | 626 ---- .../sdl/src/video/symbian/EKA1/SDL_epocvideo.cpp | 1356 --------- .../sdl/src/video/symbian/EKA1/SDL_epocvideo.h | 34 - .../sdl/src/video/symbian/EKA2/SDL_epocevents.cpp | 521 ---- .../sdl/src/video/symbian/EKA2/SDL_epocvideo.cpp | 594 ---- .../sdl/src/video/symbian/EKA2/SDL_epocvideo.h | 51 - apps/plugins/sdl/src/video/symbian/EKA2/dsa.cpp | 1505 ---------- .../plugins/sdl/src/video/symbian/EKA2/dsa_new.cpp | 1443 ---------- .../plugins/sdl/src/video/symbian/EKA2/dsa_old.cpp | 1075 ------- .../sdl/src/video/symbian/SDL_epocevents_c.h | 60 - apps/plugins/sdl/src/video/vgl/SDL_vglevents.c | 299 -- apps/plugins/sdl/src/video/vgl/SDL_vglevents_c.h | 155 - apps/plugins/sdl/src/video/vgl/SDL_vglmouse.c | 56 - apps/plugins/sdl/src/video/vgl/SDL_vglmouse_c.h | 32 - apps/plugins/sdl/src/video/vgl/SDL_vglvideo.c | 624 ---- apps/plugins/sdl/src/video/vgl/SDL_vglvideo.h | 65 - .../plugins/sdl/src/video/wincommon/SDL_lowvideo.h | 152 - .../sdl/src/video/wincommon/SDL_sysevents.c | 855 ------ .../plugins/sdl/src/video/wincommon/SDL_sysmouse.c | 259 -- .../sdl/src/video/wincommon/SDL_sysmouse_c.h | 33 - apps/plugins/sdl/src/video/wincommon/SDL_syswm.c | 297 -- apps/plugins/sdl/src/video/wincommon/SDL_syswm_c.h | 35 - apps/plugins/sdl/src/video/wincommon/SDL_wingl.c | 659 ----- apps/plugins/sdl/src/video/wincommon/SDL_wingl_c.h | 135 - apps/plugins/sdl/src/video/wincommon/wmmsg.h | 1030 ------- apps/plugins/sdl/src/video/windib/SDL_dibevents.c | 704 ----- .../plugins/sdl/src/video/windib/SDL_dibevents_c.h | 35 - apps/plugins/sdl/src/video/windib/SDL_dibvideo.c | 1323 --------- apps/plugins/sdl/src/video/windib/SDL_dibvideo.h | 59 - .../sdl/src/video/windib/SDL_gapidibvideo.h | 56 - apps/plugins/sdl/src/video/windib/SDL_vkeys.h | 75 - apps/plugins/sdl/src/video/windx5/SDL_dx5events.c | 1005 ------- .../plugins/sdl/src/video/windx5/SDL_dx5events_c.h | 37 - apps/plugins/sdl/src/video/windx5/SDL_dx5video.c | 2537 ---------------- apps/plugins/sdl/src/video/windx5/SDL_dx5video.h | 61 - apps/plugins/sdl/src/video/windx5/SDL_dx5yuv.c | 296 -- apps/plugins/sdl/src/video/windx5/SDL_dx5yuv_c.h | 38 - apps/plugins/sdl/src/video/windx5/directx.h | 97 - .../sdl/src/video/wscons/SDL_wsconsevents.c | 233 -- .../sdl/src/video/wscons/SDL_wsconsevents_c.h | 36 - .../plugins/sdl/src/video/wscons/SDL_wsconsmouse.c | 33 - .../sdl/src/video/wscons/SDL_wsconsmouse_c.h | 26 - .../plugins/sdl/src/video/wscons/SDL_wsconsvideo.c | 609 ---- .../plugins/sdl/src/video/wscons/SDL_wsconsvideo.h | 76 - apps/plugins/sdl/src/video/x11/SDL_x11dga.c | 90 - apps/plugins/sdl/src/video/x11/SDL_x11dga_c.h | 33 - apps/plugins/sdl/src/video/x11/SDL_x11dyn.c | 222 -- apps/plugins/sdl/src/video/x11/SDL_x11dyn.h | 93 - apps/plugins/sdl/src/video/x11/SDL_x11events.c | 1414 --------- apps/plugins/sdl/src/video/x11/SDL_x11events_c.h | 34 - apps/plugins/sdl/src/video/x11/SDL_x11gamma.c | 142 - apps/plugins/sdl/src/video/x11/SDL_x11gamma_c.h | 32 - apps/plugins/sdl/src/video/x11/SDL_x11gl.c | 577 ---- apps/plugins/sdl/src/video/x11/SDL_x11gl_c.h | 99 - apps/plugins/sdl/src/video/x11/SDL_x11image.c | 316 -- apps/plugins/sdl/src/video/x11/SDL_x11image_c.h | 38 - apps/plugins/sdl/src/video/x11/SDL_x11modes.c | 1143 -------- apps/plugins/sdl/src/video/x11/SDL_x11modes_c.h | 43 - apps/plugins/sdl/src/video/x11/SDL_x11mouse.c | 288 -- apps/plugins/sdl/src/video/x11/SDL_x11mouse_c.h | 33 - apps/plugins/sdl/src/video/x11/SDL_x11sym.h | 201 -- apps/plugins/sdl/src/video/x11/SDL_x11video.c | 1571 ---------- apps/plugins/sdl/src/video/x11/SDL_x11video.h | 214 -- apps/plugins/sdl/src/video/x11/SDL_x11wm.c | 434 --- apps/plugins/sdl/src/video/x11/SDL_x11wm_c.h | 34 - apps/plugins/sdl/src/video/x11/SDL_x11yuv.c | 538 ---- apps/plugins/sdl/src/video/x11/SDL_x11yuv_c.h | 41 - apps/plugins/sdl/src/video/xbios/SDL_xbios.c | 1116 -------- apps/plugins/sdl/src/video/xbios/SDL_xbios.h | 111 - .../plugins/sdl/src/video/xbios/SDL_xbios_blowup.c | 77 - .../plugins/sdl/src/video/xbios/SDL_xbios_blowup.h | 86 - .../sdl/src/video/xbios/SDL_xbios_centscreen.c | 104 - .../sdl/src/video/xbios/SDL_xbios_centscreen.h | 114 - apps/plugins/sdl/src/video/xbios/SDL_xbios_milan.c | 106 - apps/plugins/sdl/src/video/xbios/SDL_xbios_milan.h | 129 - apps/plugins/sdl/src/video/xbios/SDL_xbios_sb3.c | 83 - apps/plugins/sdl/src/video/xbios/SDL_xbios_sb3.h | 82 - .../sdl/src/video/xbios/SDL_xbios_tveille.c | 63 - .../sdl/src/video/xbios/SDL_xbios_tveille.h | 64 - 325 files changed, 93458 deletions(-) delete mode 100644 apps/plugins/sdl/src/video/Xext/README delete mode 100644 apps/plugins/sdl/src/video/Xext/XME/xme.c delete mode 100644 apps/plugins/sdl/src/video/Xext/Xinerama/Xinerama.c delete mode 100644 apps/plugins/sdl/src/video/Xext/Xv/Xv.c delete mode 100644 apps/plugins/sdl/src/video/Xext/Xv/Xvlibint.h delete mode 100644 apps/plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA.c delete mode 100644 apps/plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA2.c delete mode 100644 apps/plugins/sdl/src/video/Xext/Xxf86vm/XF86VMode.c delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/Xext.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/Xinerama.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/Xv.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/Xvlib.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/Xvproto.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/extutil.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/panoramiXext.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/panoramiXproto.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/xf86dga.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/xf86dga1.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/xf86dga1str.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/xf86dgastr.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/xf86vmode.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/xf86vmstr.h delete mode 100644 apps/plugins/sdl/src/video/Xext/extensions/xme.h delete mode 100644 apps/plugins/sdl/src/video/aalib/SDL_aaevents.c delete mode 100644 apps/plugins/sdl/src/video/aalib/SDL_aaevents_c.h delete mode 100644 apps/plugins/sdl/src/video/aalib/SDL_aamouse.c delete mode 100644 apps/plugins/sdl/src/video/aalib/SDL_aamouse_c.h delete mode 100644 apps/plugins/sdl/src/video/aalib/SDL_aavideo.c delete mode 100644 apps/plugins/sdl/src/video/aalib/SDL_aavideo.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_ataric2p.S delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_ataric2p_s.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_ataridevmouse.c delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_ataridevmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarieddi.S delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarieddi_s.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarievents.c delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarievents_c.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarigl.c delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarigl_c.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarikeys.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarimxalloc.c delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarimxalloc_c.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_atarisuper.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_biosevents.c delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_biosevents_c.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_gemdosevents.c delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_gemdosevents_c.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_ikbdevents.c delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_ikbdevents_c.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_ikbdinterrupt.S delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_ikbdinterrupt_s.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_xbiosevents.c delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_xbiosevents_c.h delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_xbiosinterrupt.S delete mode 100644 apps/plugins/sdl/src/video/ataricommon/SDL_xbiosinterrupt_s.h delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_BView.h delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_BWin.h delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_lowvideo.h delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_sysevents.cc delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_sysevents_c.h delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_sysmouse.cc delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_sysmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_sysvideo.cc delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_syswm.cc delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_syswm_c.h delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_sysyuv.cc delete mode 100644 apps/plugins/sdl/src/video/bwindow/SDL_sysyuv.h delete mode 100644 apps/plugins/sdl/src/video/caca/SDL_cacaevents.c delete mode 100644 apps/plugins/sdl/src/video/caca/SDL_cacaevents_c.h delete mode 100644 apps/plugins/sdl/src/video/caca/SDL_cacavideo.c delete mode 100644 apps/plugins/sdl/src/video/caca/SDL_cacavideo.h delete mode 100644 apps/plugins/sdl/src/video/dc/SDL_dcevents.c delete mode 100644 apps/plugins/sdl/src/video/dc/SDL_dcevents_c.h delete mode 100644 apps/plugins/sdl/src/video/dc/SDL_dcmouse.c delete mode 100644 apps/plugins/sdl/src/video/dc/SDL_dcmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/dc/SDL_dcvideo.c delete mode 100644 apps/plugins/sdl/src/video/dc/SDL_dcvideo.h delete mode 100644 apps/plugins/sdl/src/video/dga/SDL_dgaevents.c delete mode 100644 apps/plugins/sdl/src/video/dga/SDL_dgaevents_c.h delete mode 100644 apps/plugins/sdl/src/video/dga/SDL_dgamouse.c delete mode 100644 apps/plugins/sdl/src/video/dga/SDL_dgamouse_c.h delete mode 100644 apps/plugins/sdl/src/video/dga/SDL_dgavideo.c delete mode 100644 apps/plugins/sdl/src/video/dga/SDL_dgavideo.h delete mode 100644 apps/plugins/sdl/src/video/directfb/SDL_DirectFB_events.c delete mode 100644 apps/plugins/sdl/src/video/directfb/SDL_DirectFB_events.h delete mode 100644 apps/plugins/sdl/src/video/directfb/SDL_DirectFB_keys.h delete mode 100644 apps/plugins/sdl/src/video/directfb/SDL_DirectFB_video.c delete mode 100644 apps/plugins/sdl/src/video/directfb/SDL_DirectFB_video.h delete mode 100644 apps/plugins/sdl/src/video/directfb/SDL_DirectFB_yuv.c delete mode 100644 apps/plugins/sdl/src/video/directfb/SDL_DirectFB_yuv.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/3dfx_mmio.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/3dfx_regs.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fb3dfx.c delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fb3dfx.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbelo.c delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbelo.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbevents.c delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbevents_c.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbkeys.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbmatrox.c delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbmatrox.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbmouse.c delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbriva.c delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbriva.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbvideo.c delete mode 100644 apps/plugins/sdl/src/video/fbcon/SDL_fbvideo.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/matrox_mmio.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/matrox_regs.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/riva_mmio.h delete mode 100644 apps/plugins/sdl/src/video/fbcon/riva_regs.h delete mode 100644 apps/plugins/sdl/src/video/gapi/SDL_gapivideo.c delete mode 100644 apps/plugins/sdl/src/video/gapi/SDL_gapivideo.h delete mode 100644 apps/plugins/sdl/src/video/gem/SDL_gemevents.c delete mode 100644 apps/plugins/sdl/src/video/gem/SDL_gemevents_c.h delete mode 100644 apps/plugins/sdl/src/video/gem/SDL_gemmouse.c delete mode 100644 apps/plugins/sdl/src/video/gem/SDL_gemmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/gem/SDL_gemvideo.c delete mode 100644 apps/plugins/sdl/src/video/gem/SDL_gemvideo.h delete mode 100644 apps/plugins/sdl/src/video/gem/SDL_gemwm.c delete mode 100644 apps/plugins/sdl/src/video/gem/SDL_gemwm_c.h delete mode 100644 apps/plugins/sdl/src/video/ggi/SDL_ggievents.c delete mode 100755 apps/plugins/sdl/src/video/ggi/SDL_ggievents_c.h delete mode 100644 apps/plugins/sdl/src/video/ggi/SDL_ggikeys.h delete mode 100644 apps/plugins/sdl/src/video/ggi/SDL_ggimouse.c delete mode 100755 apps/plugins/sdl/src/video/ggi/SDL_ggimouse_c.h delete mode 100644 apps/plugins/sdl/src/video/ggi/SDL_ggivideo.c delete mode 100644 apps/plugins/sdl/src/video/ggi/SDL_ggivideo.h delete mode 100644 apps/plugins/sdl/src/video/ipod/SDL_ipodvideo.c delete mode 100644 apps/plugins/sdl/src/video/ipod/SDL_ipodvideo.h delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_lowvideo.h delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_macevents.c delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_macevents_c.h delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_macgl.c delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_macgl_c.h delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_mackeys.h delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_macmouse.c delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_macmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_macwm.c delete mode 100644 apps/plugins/sdl/src/video/maccommon/SDL_macwm_c.h delete mode 100644 apps/plugins/sdl/src/video/macdsp/SDL_dspvideo.c delete mode 100644 apps/plugins/sdl/src/video/macdsp/SDL_dspvideo.h delete mode 100644 apps/plugins/sdl/src/video/macrom/SDL_romvideo.c delete mode 100644 apps/plugins/sdl/src/video/macrom/SDL_romvideo.h delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxevents.c delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxevents_c.h delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nximage.c delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nximage_c.h delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxmodes.c delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxmodes_c.h delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxmouse.c delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxvideo.c delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxvideo.h delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxwm.c delete mode 100644 apps/plugins/sdl/src/video/nanox/SDL_nxwm_c.h delete mode 100644 apps/plugins/sdl/src/video/nds/SDL_ndsevents.c delete mode 100644 apps/plugins/sdl/src/video/nds/SDL_ndsevents_c.h delete mode 100644 apps/plugins/sdl/src/video/nds/SDL_ndsmouse.c delete mode 100644 apps/plugins/sdl/src/video/nds/SDL_ndsmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/nds/SDL_ndsvideo.c delete mode 100644 apps/plugins/sdl/src/video/nds/SDL_ndsvideo.h delete mode 100644 apps/plugins/sdl/src/video/os2fslib/SDL_os2fslib.c delete mode 100644 apps/plugins/sdl/src/video/os2fslib/SDL_os2fslib.h delete mode 100644 apps/plugins/sdl/src/video/os2fslib/SDL_vkeys.h delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_events.c delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_events_c.h delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_gl.c delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_gl.h delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_image.c delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_image_c.h delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_modes.c delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_modes_c.h delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_mouse.c delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_mouse_c.h delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_video.c delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_video.h delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_wm.c delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_ph_wm_c.h delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_phyuv.c delete mode 100644 apps/plugins/sdl/src/video/photon/SDL_phyuv_c.h delete mode 100644 apps/plugins/sdl/src/video/picogui/SDL_pgevents.c delete mode 100644 apps/plugins/sdl/src/video/picogui/SDL_pgevents_c.h delete mode 100644 apps/plugins/sdl/src/video/picogui/SDL_pgvideo.c delete mode 100644 apps/plugins/sdl/src/video/picogui/SDL_pgvideo.h delete mode 100644 apps/plugins/sdl/src/video/ps2gs/SDL_gsevents.c delete mode 100644 apps/plugins/sdl/src/video/ps2gs/SDL_gsevents_c.h delete mode 100644 apps/plugins/sdl/src/video/ps2gs/SDL_gskeys.h delete mode 100644 apps/plugins/sdl/src/video/ps2gs/SDL_gsmouse.c delete mode 100644 apps/plugins/sdl/src/video/ps2gs/SDL_gsmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/ps2gs/SDL_gsvideo.c delete mode 100644 apps/plugins/sdl/src/video/ps2gs/SDL_gsvideo.h delete mode 100644 apps/plugins/sdl/src/video/ps2gs/SDL_gsyuv.c delete mode 100644 apps/plugins/sdl/src/video/ps2gs/SDL_gsyuv_c.h delete mode 100644 apps/plugins/sdl/src/video/ps3/SDL_ps3events.c delete mode 100644 apps/plugins/sdl/src/video/ps3/SDL_ps3events_c.h delete mode 100644 apps/plugins/sdl/src/video/ps3/SDL_ps3video.c delete mode 100644 apps/plugins/sdl/src/video/ps3/SDL_ps3video.h delete mode 100644 apps/plugins/sdl/src/video/ps3/SDL_ps3yuv.c delete mode 100644 apps/plugins/sdl/src/video/ps3/SDL_ps3yuv_c.h delete mode 100644 apps/plugins/sdl/src/video/ps3/spulibs/Makefile delete mode 100644 apps/plugins/sdl/src/video/ps3/spulibs/bilin_scaler.c delete mode 100644 apps/plugins/sdl/src/video/ps3/spulibs/fb_writer.c delete mode 100644 apps/plugins/sdl/src/video/ps3/spulibs/spu_common.h delete mode 100644 apps/plugins/sdl/src/video/ps3/spulibs/yuv2rgb_converter.c delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_QPEApp.cc delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_QPEApp.h delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_QWin.cc delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_QWin.h delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_lowvideo.h delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_sysevents.cc delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_sysevents_c.h delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_sysmouse.cc delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_sysmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_sysvideo.cc delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_syswm.cc delete mode 100644 apps/plugins/sdl/src/video/qtopia/SDL_syswm_c.h delete mode 100644 apps/plugins/sdl/src/video/quartz/CGS.h delete mode 100644 apps/plugins/sdl/src/video/quartz/SDL_QuartzEvents.m delete mode 100644 apps/plugins/sdl/src/video/quartz/SDL_QuartzGL.m delete mode 100644 apps/plugins/sdl/src/video/quartz/SDL_QuartzKeys.h delete mode 100644 apps/plugins/sdl/src/video/quartz/SDL_QuartzVideo.h delete mode 100644 apps/plugins/sdl/src/video/quartz/SDL_QuartzVideo.m delete mode 100644 apps/plugins/sdl/src/video/quartz/SDL_QuartzWM.h delete mode 100644 apps/plugins/sdl/src/video/quartz/SDL_QuartzWM.m delete mode 100644 apps/plugins/sdl/src/video/quartz/SDL_QuartzWindow.h delete mode 100644 apps/plugins/sdl/src/video/quartz/SDL_QuartzWindow.m delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscosASM.S delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscosFullScreenVideo.c delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscosevents.c delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscosevents_c.h delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscosmouse.c delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscosmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscossprite.c delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscostask.c delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscostask.h delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscosvideo.c delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_riscosvideo.h delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_wimppoll.c delete mode 100644 apps/plugins/sdl/src/video/riscos/SDL_wimpvideo.c delete mode 100644 apps/plugins/sdl/src/video/svga/SDL_svgaevents.c delete mode 100644 apps/plugins/sdl/src/video/svga/SDL_svgaevents_c.h delete mode 100644 apps/plugins/sdl/src/video/svga/SDL_svgamouse.c delete mode 100644 apps/plugins/sdl/src/video/svga/SDL_svgamouse_c.h delete mode 100644 apps/plugins/sdl/src/video/svga/SDL_svgavideo.c delete mode 100644 apps/plugins/sdl/src/video/svga/SDL_svgavideo.h delete mode 100644 apps/plugins/sdl/src/video/symbian/EKA1/SDL_epocevents.cpp delete mode 100644 apps/plugins/sdl/src/video/symbian/EKA1/SDL_epocvideo.cpp delete mode 100644 apps/plugins/sdl/src/video/symbian/EKA1/SDL_epocvideo.h delete mode 100644 apps/plugins/sdl/src/video/symbian/EKA2/SDL_epocevents.cpp delete mode 100644 apps/plugins/sdl/src/video/symbian/EKA2/SDL_epocvideo.cpp delete mode 100644 apps/plugins/sdl/src/video/symbian/EKA2/SDL_epocvideo.h delete mode 100644 apps/plugins/sdl/src/video/symbian/EKA2/dsa.cpp delete mode 100644 apps/plugins/sdl/src/video/symbian/EKA2/dsa_new.cpp delete mode 100644 apps/plugins/sdl/src/video/symbian/EKA2/dsa_old.cpp delete mode 100644 apps/plugins/sdl/src/video/symbian/SDL_epocevents_c.h delete mode 100644 apps/plugins/sdl/src/video/vgl/SDL_vglevents.c delete mode 100644 apps/plugins/sdl/src/video/vgl/SDL_vglevents_c.h delete mode 100644 apps/plugins/sdl/src/video/vgl/SDL_vglmouse.c delete mode 100644 apps/plugins/sdl/src/video/vgl/SDL_vglmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/vgl/SDL_vglvideo.c delete mode 100644 apps/plugins/sdl/src/video/vgl/SDL_vglvideo.h delete mode 100644 apps/plugins/sdl/src/video/wincommon/SDL_lowvideo.h delete mode 100644 apps/plugins/sdl/src/video/wincommon/SDL_sysevents.c delete mode 100644 apps/plugins/sdl/src/video/wincommon/SDL_sysmouse.c delete mode 100644 apps/plugins/sdl/src/video/wincommon/SDL_sysmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/wincommon/SDL_syswm.c delete mode 100644 apps/plugins/sdl/src/video/wincommon/SDL_syswm_c.h delete mode 100644 apps/plugins/sdl/src/video/wincommon/SDL_wingl.c delete mode 100644 apps/plugins/sdl/src/video/wincommon/SDL_wingl_c.h delete mode 100644 apps/plugins/sdl/src/video/wincommon/wmmsg.h delete mode 100644 apps/plugins/sdl/src/video/windib/SDL_dibevents.c delete mode 100644 apps/plugins/sdl/src/video/windib/SDL_dibevents_c.h delete mode 100644 apps/plugins/sdl/src/video/windib/SDL_dibvideo.c delete mode 100644 apps/plugins/sdl/src/video/windib/SDL_dibvideo.h delete mode 100644 apps/plugins/sdl/src/video/windib/SDL_gapidibvideo.h delete mode 100644 apps/plugins/sdl/src/video/windib/SDL_vkeys.h delete mode 100644 apps/plugins/sdl/src/video/windx5/SDL_dx5events.c delete mode 100644 apps/plugins/sdl/src/video/windx5/SDL_dx5events_c.h delete mode 100644 apps/plugins/sdl/src/video/windx5/SDL_dx5video.c delete mode 100644 apps/plugins/sdl/src/video/windx5/SDL_dx5video.h delete mode 100644 apps/plugins/sdl/src/video/windx5/SDL_dx5yuv.c delete mode 100644 apps/plugins/sdl/src/video/windx5/SDL_dx5yuv_c.h delete mode 100644 apps/plugins/sdl/src/video/windx5/directx.h delete mode 100644 apps/plugins/sdl/src/video/wscons/SDL_wsconsevents.c delete mode 100644 apps/plugins/sdl/src/video/wscons/SDL_wsconsevents_c.h delete mode 100644 apps/plugins/sdl/src/video/wscons/SDL_wsconsmouse.c delete mode 100644 apps/plugins/sdl/src/video/wscons/SDL_wsconsmouse_c.h delete mode 100644 apps/plugins/sdl/src/video/wscons/SDL_wsconsvideo.c delete mode 100644 apps/plugins/sdl/src/video/wscons/SDL_wsconsvideo.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11dga.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11dga_c.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11dyn.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11dyn.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11events.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11events_c.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11gamma.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11gamma_c.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11gl.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11gl_c.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11image.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11image_c.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11modes.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11modes_c.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11mouse.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11mouse_c.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11sym.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11video.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11video.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11wm.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11wm_c.h delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11yuv.c delete mode 100644 apps/plugins/sdl/src/video/x11/SDL_x11yuv_c.h delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios.c delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios.h delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_blowup.c delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_blowup.h delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_centscreen.c delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_centscreen.h delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_milan.c delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_milan.h delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_sb3.c delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_sb3.h delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_tveille.c delete mode 100644 apps/plugins/sdl/src/video/xbios/SDL_xbios_tveille.h (limited to 'apps/plugins/sdl/src/video') diff --git a/apps/plugins/sdl/src/video/Xext/README b/apps/plugins/sdl/src/video/Xext/README deleted file mode 100644 index a16ea68444..0000000000 --- a/apps/plugins/sdl/src/video/Xext/README +++ /dev/null @@ -1,10 +0,0 @@ - -The reason these libraries are built outside of the standard XFree86 -tree is so that they can be linked as shared object code directly into -SDL without causing any symbol collisions with code in the application. - -You can't link static library code into shared libraries on non-x86 -Linux platforms. Since these libraries haven't become standard yet, -we'll just include them directly. - -These sources are synchronized with XFree86 4.2.1 diff --git a/apps/plugins/sdl/src/video/Xext/XME/xme.c b/apps/plugins/sdl/src/video/Xext/XME/xme.c deleted file mode 100644 index 2cead35ada..0000000000 --- a/apps/plugins/sdl/src/video/Xext/XME/xme.c +++ /dev/null @@ -1,410 +0,0 @@ -/* - * Copyright 1993-2001 by Xi Graphics, Inc. - * All Rights Reserved. - * - * Please see the LICENSE file accompanying this distribution for licensing - * information. - * - * Please send any bug fixes and modifications to src@xig.com. - * - * $XiGId: xme.c,v 1.2 2001/11/30 21:56:59 jon Exp $ - * - */ - -#define NEED_EVENTS -#define NEED_REPLIES - -/* Apparently some X11 systems can't include this multiple times... */ -#ifndef SDL_INCLUDED_XLIBINT_H -#define SDL_INCLUDED_XLIBINT_H 1 -#include -#endif - -#include -#include -#include -#include "../extensions/Xext.h" -#include "../extensions/extutil.h" - -/*****************************************************************************/ - - -#define XIGMISC_PROTOCOL_NAME "XiG-SUNDRY-NONSTANDARD" -#define XIGMISC_MAJOR_VERSION 2 -#define XIGMISC_MINOR_VERSION 0 - -#define XiGMiscNumberEvents 0 - -#define X_XiGMiscQueryVersion 0 -#define X_XiGMiscQueryViews 1 -#define X_XiGMiscQueryResolutions 2 -#define X_XiGMiscChangeResolution 3 -#define X_XiGMiscFullScreen 4 - -#define sz_xXiGMiscQueryVersionReq 8 -#define sz_xXiGMiscQueryViewsReq 8 -#define sz_xXiGMiscQueryResolutionsReq 8 -#define sz_xXiGMiscChangeResolutionReq 16 -#define sz_xXiGMiscFullScreenReq 16 - -#define sz_xXiGMiscQueryVersionReply 32 -#define sz_xXiGMiscQueryViewsReply 32 -#define sz_xXiGMiscQueryResolutionsReply 32 -#define sz_xXiGMiscQueryFullScreenReply 32 - -/*******************************************************************/ - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 xigmiscReqType; /* always X_XiGMiscQueryVersion */ - CARD16 length; - CARD16 major; - CARD16 minor; -} xXiGMiscQueryVersionReq; - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 xigmiscReqType; /* always X_XiGMiscQueryViews */ - CARD16 length; - CARD8 screen; - CARD8 pad0; - CARD16 pad1; -} xXiGMiscQueryViewsReq; - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 xigmiscReqType; /* always X_XiGMiscQueryResolutions */ - CARD16 length; - CARD8 screen; - CARD8 view; - CARD16 pad0; -} xXiGMiscQueryResolutionsReq; - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 xigmiscReqType; /* always X_XiGMiscChangeResolution */ - CARD16 length; - CARD8 screen; - CARD8 view; - CARD16 pad0; - CARD16 width; - CARD16 height; - INT32 refresh; -} xXiGMiscChangeResolutionReq; - -typedef struct { - CARD8 reqType; /* always codes->major_opcode */ - CARD8 xigmiscReqType; /* always X_XiGMiscFullScreen */ - CARD16 length; - CARD8 screen; - CARD8 pad0; - CARD16 pad1; - CARD32 window; - CARD32 cmap; -} xXiGMiscFullScreenReq; - -/*******************************************************************/ - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 pad0; - CARD16 sequenceNumber; - CARD32 length; - CARD16 major; - CARD16 minor; - CARD32 pad1; - CARD32 pad2; - CARD32 pad3; - CARD32 pad4; - CARD32 pad5; -} xXiGMiscQueryVersionReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 pad0; - CARD16 sequenceNumber; - CARD32 length; - CARD32 nviews; - CARD32 pad1; - CARD32 pad2; - CARD32 pad3; - CARD32 pad4; - CARD32 pad5; -} xXiGMiscQueryViewsReply; - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 pad0; - CARD16 sequenceNumber; - CARD32 length; - CARD16 active; - CARD16 nresolutions; - CARD32 pad1; - CARD32 pad2; - CARD32 pad3; - CARD32 pad4; - CARD32 pad5; -} xXiGMiscQueryResolutionsReply; - -typedef struct { - BYTE type; /* X_Reply */ - BOOL success; - CARD16 sequenceNumber; - CARD32 length; - CARD32 pad1; - CARD32 pad2; - CARD32 pad3; - CARD32 pad4; - CARD32 pad5; - CARD32 pad6; -} xXiGMiscFullScreenReply; - -/*******************************************************************/ - -typedef struct { - INT16 x; - INT16 y; - CARD16 w; - CARD16 h; -} XiGMiscViewInfo; - -typedef struct { - CARD16 width; - CARD16 height; - INT32 refresh; -} XiGMiscResolutionInfo; - -/*****************************************************************************/ - -static XExtensionInfo *xigmisc_info = NULL; -static char *xigmisc_extension_name = XIGMISC_PROTOCOL_NAME; - -#define XiGMiscCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, xigmisc_extension_name, val) -#define XiGMiscSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, xigmisc_extension_name) - -#if defined(__STDC__) && !defined(UNIXCPP) -#define XiGMiscGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->xigmiscReqType = X_##name; - -#define XiGMiscGetReqExtra(name,n,req,info) GetReqExtra (name, n, req); \ - req->reqType = info->codes->major_opcode; \ - req->xigmicReqType = X_##name; -#else -#define XiGMiscGetReq(name,req,info) GetReq (name, req); \ - req->reqType = info->codes->major_opcode; \ - req->xigmiscReqType = X_/**/name; -#define XiGMiscGetReqExtra(name,n,req,info) GetReqExtra (name, n, req); \ - req->reqType = info->codes->major_opcode; \ - req->xigmiscReqType = X_/**/name; -#endif - - - -/* - * find_display - locate the display info block - */ -static int XiGMiscCloseDisplay(); - -static XExtensionHooks xigmisc_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - XiGMiscCloseDisplay, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - - -static XEXT_GENERATE_CLOSE_DISPLAY (XiGMiscCloseDisplay, xigmisc_info) - -static XEXT_GENERATE_FIND_DISPLAY (XiGMiscFindDisplay, xigmisc_info, - xigmisc_extension_name, - &xigmisc_extension_hooks, XiGMiscNumberEvents, NULL) - - -/*****************************************************************************/ - -Bool XiGMiscQueryVersion(Display *dpy, int *major, int *minor) -{ - int opcode, event, error; - xXiGMiscQueryVersionReq *req; - xXiGMiscQueryVersionReply rep; - XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); - - if (!XQueryExtension(dpy, XIGMISC_PROTOCOL_NAME, &opcode, &event, &error)) - return xFalse; - - XiGMiscCheckExtension(dpy, info, xFalse); - - LockDisplay (dpy); - XiGMiscGetReq (XiGMiscQueryVersion, req, info); - - req->major = XIGMISC_MAJOR_VERSION; - req->minor = XIGMISC_MINOR_VERSION; - - if (!_XReply (dpy, (xReply *)&rep, 0, xTrue)) { - UnlockDisplay(dpy); - SyncHandle(); - return xFalse; - } - - *major = rep.major; - *minor = rep.minor; - UnlockDisplay(dpy); - SyncHandle(); - - return xTrue; -} - -int XiGMiscQueryViews(Display *dpy, int screen, XiGMiscViewInfo **pviews) -{ - int n, size; - XiGMiscViewInfo *views; - xXiGMiscQueryViewsReq *req; - xXiGMiscQueryViewsReply rep; - XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); - XiGMiscCheckExtension(dpy, info, 0); - - LockDisplay (dpy); - XiGMiscGetReq (XiGMiscQueryViews, req, info); - req->screen = screen; - - if (!_XReply (dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - - n = rep.nviews; - - if (n > 0) { - size = sizeof(XiGMiscViewInfo) * n; - views = (XiGMiscViewInfo*)Xmalloc(size); - if (!views) { - _XEatData(dpy, (unsigned long)size); - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - - _XReadPad(dpy, (void*)views, size); - - *pviews = views; - } - - UnlockDisplay(dpy); - SyncHandle(); - - return n; -} - -int XiGMiscQueryResolutions(Display *dpy, int screen, int view, int *pactive, XiGMiscResolutionInfo **presolutions) -{ - int n, size; - XiGMiscResolutionInfo *resolutions; - xXiGMiscQueryResolutionsReq *req; - xXiGMiscQueryResolutionsReply rep; - XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); - XiGMiscCheckExtension(dpy, info, 0); - - LockDisplay (dpy); - XiGMiscGetReq (XiGMiscQueryResolutions, req, info); - req->screen = screen; - req->view = view; - - if (!_XReply (dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - - n = rep.nresolutions; - - if (n > 0) { - size = sizeof(XiGMiscResolutionInfo) * n; - resolutions = (XiGMiscResolutionInfo*)Xmalloc(size); - if (!resolutions) { - _XEatData(dpy, (unsigned long)size); - UnlockDisplay(dpy); - SyncHandle(); - return 0; - } - - _XReadPad(dpy, (void*)resolutions, size); - - *presolutions = resolutions; - *pactive = rep.active; - } - - UnlockDisplay(dpy); - SyncHandle(); - - return n; -} - -void XiGMiscChangeResolution(Display *dpy, int screen, int view, int width, int height, int refresh) -{ - xXiGMiscChangeResolutionReq *req; - XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); - - XiGMiscSimpleCheckExtension(dpy, info); - - LockDisplay (dpy); - XiGMiscGetReq (XiGMiscChangeResolution, req, info); - req->screen = screen; - req->view = view; - req->width = width; - req->height = height; - req->refresh = refresh; - - UnlockDisplay(dpy); - SyncHandle(); -} - - -Bool XiGMiscFullScreen(Display *dpy, int screen, XID window, XID cmap) -{ - xXiGMiscFullScreenReq *req; - xXiGMiscFullScreenReply rep; - XExtDisplayInfo *info = XiGMiscFindDisplay(dpy); - - XiGMiscCheckExtension(dpy, info, xFalse); - - LockDisplay (dpy); - XiGMiscGetReq (XiGMiscFullScreen, req, info); - req->screen = screen; - req->pad0 = 0; - req->pad1 = 0; - req->window = window; - req->cmap = cmap; - - if (!_XReply (dpy, (xReply *)&rep, 0, xTrue)) { - UnlockDisplay(dpy); - SyncHandle(); - return xFalse; - } - - UnlockDisplay(dpy); - SyncHandle(); - - return (rep.success ? xTrue : xFalse); -} - - -/* SDL addition from Ryan: free memory used by xme. */ -void XiGMiscDestroy(void) -{ - if (xigmisc_info) { - XextDestroyExtension(xigmisc_info); - xigmisc_info = NULL; - } -} - diff --git a/apps/plugins/sdl/src/video/Xext/Xinerama/Xinerama.c b/apps/plugins/sdl/src/video/Xext/Xinerama/Xinerama.c deleted file mode 100644 index 4ff42ebfe9..0000000000 --- a/apps/plugins/sdl/src/video/Xext/Xinerama/Xinerama.c +++ /dev/null @@ -1,324 +0,0 @@ -/* $Xorg: XPanoramiX.c,v 1.4 2000/08/17 19:45:51 cpqbld Exp $ */ -/***************************************************************** -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. -******************************************************************/ -/* $XFree86: xc/lib/Xinerama/Xinerama.c,v 1.2 2001/07/23 17:20:28 dawes Exp $ */ - -#define NEED_EVENTS -#define NEED_REPLIES - -/* Apparently some X11 systems can't include this multiple times... */ -#ifndef SDL_INCLUDED_XLIBINT_H -#define SDL_INCLUDED_XLIBINT_H 1 -#include -#endif - -#include -#include "../extensions/Xext.h" -#include "../extensions/extutil.h" /* in ../include */ -#include "../extensions/panoramiXext.h" -#include "../extensions/panoramiXproto.h" /* in ../include */ -#include "../extensions/Xinerama.h" - -static XExtensionInfo _panoramiX_ext_info_data; -static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data; -static /* const */ char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME; - -#define PanoramiXCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, panoramiX_extension_name, val) -#define PanoramiXSimpleCheckExtension(dpy,i) \ - XextSimpleCheckExtension (dpy, i, panoramiX_extension_name) - -static int close_display(); -static /* const */ XExtensionHooks panoramiX_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, panoramiX_ext_info, - panoramiX_extension_name, - &panoramiX_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, panoramiX_ext_info) - - - -/**************************************************************************** - * * - * PanoramiX public interfaces * - * * - ****************************************************************************/ - -Bool SDL_NAME(XPanoramiXQueryExtension) ( - Display *dpy, - int *event_basep, - int *error_basep -) -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -Status SDL_NAME(XPanoramiXQueryVersion)( - Display *dpy, - int *major_versionp, - int *minor_versionp -) -{ - XExtDisplayInfo *info = find_display (dpy); - xPanoramiXQueryVersionReply rep; - register xPanoramiXQueryVersionReq *req; - - PanoramiXCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (PanoramiXQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_PanoramiXQueryVersion; - req->clientMajor = PANORAMIX_MAJOR_VERSION; - req->clientMinor = PANORAMIX_MINOR_VERSION; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - *major_versionp = rep.majorVersion; - *minor_versionp = rep.minorVersion; - UnlockDisplay (dpy); - SyncHandle (); - return 1; -} - -SDL_NAME(XPanoramiXInfo) *SDL_NAME(XPanoramiXAllocInfo)(void) -{ - return (SDL_NAME(XPanoramiXInfo) *) Xmalloc (sizeof (SDL_NAME(XPanoramiXInfo))); -} - -Status SDL_NAME(XPanoramiXGetState) ( - Display *dpy, - Drawable drawable, - SDL_NAME(XPanoramiXInfo) *panoramiX_info -) -{ - XExtDisplayInfo *info = find_display (dpy); - xPanoramiXGetStateReply rep; - register xPanoramiXGetStateReq *req; - - PanoramiXCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (PanoramiXGetState, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_PanoramiXGetState; - req->window = drawable; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - UnlockDisplay (dpy); - SyncHandle (); - panoramiX_info->window = rep.window; - panoramiX_info->State = rep.state; - return 1; -} - -Status SDL_NAME(XPanoramiXGetScreenCount) ( - Display *dpy, - Drawable drawable, - SDL_NAME(XPanoramiXInfo) *panoramiX_info -) -{ - XExtDisplayInfo *info = find_display (dpy); - xPanoramiXGetScreenCountReply rep; - register xPanoramiXGetScreenCountReq *req; - - PanoramiXCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (PanoramiXGetScreenCount, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_PanoramiXGetScreenCount; - req->window = drawable; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - UnlockDisplay (dpy); - SyncHandle (); - panoramiX_info->window = rep.window; - panoramiX_info->ScreenCount = rep.ScreenCount; - return 1; -} - -Status SDL_NAME(XPanoramiXGetScreenSize) ( - Display *dpy, - Drawable drawable, - int screen_num, - SDL_NAME(XPanoramiXInfo) *panoramiX_info -) -{ - XExtDisplayInfo *info = find_display (dpy); - xPanoramiXGetScreenSizeReply rep; - register xPanoramiXGetScreenSizeReq *req; - - PanoramiXCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (PanoramiXGetScreenSize, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_PanoramiXGetScreenSize; - req->window = drawable; - req->screen = screen_num; /* need to define */ - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return 0; - } - UnlockDisplay (dpy); - SyncHandle (); - panoramiX_info->window = rep.window; - panoramiX_info->screen = rep.screen; - panoramiX_info->width = rep.width; - panoramiX_info->height = rep.height; - return 1; -} - -/*******************************************************************\ - Alternate interface to make up for shortcomings in the original, - namely, the omission of the screen origin. The new interface is - in the "Xinerama" namespace instead of "PanoramiX". -\*******************************************************************/ - -Bool SDL_NAME(XineramaQueryExtension) ( - Display *dpy, - int *event_base, - int *error_base -) -{ - return SDL_NAME(XPanoramiXQueryExtension)(dpy, event_base, error_base); -} - -Status SDL_NAME(XineramaQueryVersion)( - Display *dpy, - int *major, - int *minor -) -{ - return SDL_NAME(XPanoramiXQueryVersion)(dpy, major, minor); -} - -Bool SDL_NAME(XineramaIsActive)(Display *dpy) -{ - xXineramaIsActiveReply rep; - xXineramaIsActiveReq *req; - XExtDisplayInfo *info = find_display (dpy); - - if(!XextHasExtension(info)) - return False; /* server doesn't even have the extension */ - - LockDisplay (dpy); - GetReq (XineramaIsActive, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_XineramaIsActive; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - UnlockDisplay (dpy); - SyncHandle (); - return rep.state; -} - -#include - -SDL_NAME(XineramaScreenInfo) * -SDL_NAME(XineramaQueryScreens)( - Display *dpy, - int *number -) -{ - XExtDisplayInfo *info = find_display (dpy); - xXineramaQueryScreensReply rep; - xXineramaQueryScreensReq *req; - SDL_NAME(XineramaScreenInfo) *scrnInfo = NULL; - - PanoramiXCheckExtension (dpy, info, 0); - - LockDisplay (dpy); - GetReq (XineramaQueryScreens, req); - req->reqType = info->codes->major_opcode; - req->panoramiXReqType = X_XineramaQueryScreens; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return NULL; - } - - if(rep.number) { - if((scrnInfo = Xmalloc(sizeof(SDL_NAME(XineramaScreenInfo)) * rep.number))) { - xXineramaScreenInfo scratch; - int i; - - for(i = 0; i < rep.number; i++) { - _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo); - scrnInfo[i].screen_number = i; - scrnInfo[i].x_org = scratch.x_org; - scrnInfo[i].y_org = scratch.y_org; - scrnInfo[i].width = scratch.width; - scrnInfo[i].height = scratch.height; - } - - *number = rep.number; - } else - _XEatData(dpy, rep.length << 2); - } - - UnlockDisplay (dpy); - SyncHandle (); - return scrnInfo; -} - - - diff --git a/apps/plugins/sdl/src/video/Xext/Xv/Xv.c b/apps/plugins/sdl/src/video/Xext/Xv/Xv.c deleted file mode 100644 index 7147b9e8cb..0000000000 --- a/apps/plugins/sdl/src/video/Xext/Xv/Xv.c +++ /dev/null @@ -1,1151 +0,0 @@ -/*********************************************************** -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. - -******************************************************************/ -/* $XFree86: xc/lib/Xv/Xv.c,v 1.15 2001/05/11 08:23:22 alanh Exp $ */ -/* -** File: -** -** Xv.c --- Xv library extension module. -** -** Author: -** -** David Carver (Digital Workstation Engineering/Project Athena) -** -** Revisions: -** -** 26.06.91 Carver -** - changed XvFreeAdaptors to XvFreeAdaptorInfo -** - changed XvFreeEncodings to XvFreeEncodingInfo -** -** 11.06.91 Carver -** - changed SetPortControl to SetPortAttribute -** - changed GetPortControl to GetPortAttribute -** - changed QueryBestSize -** -** 15.05.91 Carver -** - version 2.0 upgrade -** -** 240.01.91 Carver -** - version 1.4 upgrade -** -*/ - -#include -#include "Xvlibint.h" -#include "../extensions/Xext.h" -#include -#include "../extensions/extutil.h" - -static XExtensionInfo _xv_info_data; -static XExtensionInfo *xv_info = &_xv_info_data; -static char *xv_extension_name = XvName; - -#define XvCheckExtension(dpy, i, val) \ - XextCheckExtension(dpy, i, xv_extension_name, val) - -static char *xv_error_string(); -static int xv_close_display(); -static Bool xv_wire_to_event(); - -static XExtensionHooks xv_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - xv_close_display, /* close_display */ - xv_wire_to_event, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - xv_error_string /* error_string */ -}; - - -static char *xv_error_list[] = -{ - "BadPort", /* XvBadPort */ - "BadEncoding", /* XvBadEncoding */ - "BadControl" /* XvBadControl */ -}; - -static XEXT_GENERATE_CLOSE_DISPLAY (xv_close_display, xv_info) - - -static XEXT_GENERATE_FIND_DISPLAY (xv_find_display, xv_info, - xv_extension_name, - &xv_extension_hooks, - XvNumEvents, NULL) - - -static XEXT_GENERATE_ERROR_STRING (xv_error_string, xv_extension_name, - XvNumErrors, xv_error_list) - - -int -SDL_NAME(XvQueryExtension)( - Display *dpy, - unsigned int *p_version, - unsigned int *p_revision, - unsigned int *p_requestBase, - unsigned int *p_eventBase, - unsigned int *p_errorBase -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryExtensionReq *req; - xvQueryExtensionReply rep; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(QueryExtension, req); - - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return XvBadExtension; - } - - *p_version = rep.version; - *p_revision = rep.revision; - *p_requestBase = info->codes->major_opcode; - *p_eventBase = info->codes->first_event; - *p_errorBase = info->codes->first_error; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -SDL_NAME(XvQueryAdaptors)( - Display *dpy, - Window window, - unsigned int *p_nAdaptors, - SDL_NAME(XvAdaptorInfo) **p_pAdaptors -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryAdaptorsReq *req; - xvQueryAdaptorsReply rep; - int size,ii,jj; - char *name; - SDL_NAME(XvAdaptorInfo) *pas, *pa; - SDL_NAME(XvFormat) *pfs, *pf; - char *buffer; - union - { - char *buffer; - char *string; - xvAdaptorInfo *pa; - xvFormat *pf; - } u; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(QueryAdaptors, req); - req->window = window; - - /* READ THE REPLY */ - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadReply); - } - - size = rep.length << 2; - if ( (buffer = (char *)Xmalloc ((unsigned) size)) == NULL) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - _XRead (dpy, buffer, size); - - u.buffer = buffer; - - /* GET INPUT ADAPTORS */ - - if (rep.num_adaptors == 0) { - pas = NULL; - } else { - size = rep.num_adaptors*sizeof(SDL_NAME(XvAdaptorInfo)); - if ((pas=(SDL_NAME(XvAdaptorInfo) *)Xmalloc(size))==NULL) { - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - } - - /* INIT ADAPTOR FIELDS */ - - pa = pas; - for (ii=0; iinum_adaptors = 0; - pa->name = (char *)NULL; - pa->formats = (SDL_NAME(XvFormat) *)NULL; - pa++; - } - - pa = pas; - for (ii=0; iitype = u.pa->type; - pa->base_id = u.pa->base_id; - pa->num_ports = u.pa->num_ports; - pa->num_formats = u.pa->num_formats; - pa->num_adaptors = rep.num_adaptors - ii; - - /* GET ADAPTOR NAME */ - - size = u.pa->name_size; - u.buffer += (sz_xvAdaptorInfo + 3) & ~3; - - if ( (name = (char *)Xmalloc(size+1)) == NULL) - { - SDL_NAME(XvFreeAdaptorInfo)(pas); - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - SDL_strlcpy(name, u.string, size); - pa->name = name; - - u.buffer += (size + 3) & ~3; - - /* GET FORMATS */ - - size = pa->num_formats*sizeof(SDL_NAME(XvFormat)); - if ((pfs=(SDL_NAME(XvFormat) *)Xmalloc(size))==NULL) { - SDL_NAME(XvFreeAdaptorInfo)(pas); - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - - pf = pfs; - for (jj=0; jjnum_formats; jj++) { - pf->depth = u.pf->depth; - pf->visual_id = u.pf->visual; - pf++; - - u.buffer += (sz_xvFormat + 3) & ~3; - } - - pa->formats = pfs; - - pa++; - - } - - *p_nAdaptors = rep.num_adaptors; - *p_pAdaptors = pas; - - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - - return (Success); -} - - -void -SDL_NAME(XvFreeAdaptorInfo)(SDL_NAME(XvAdaptorInfo) *pAdaptors) -{ - - SDL_NAME(XvAdaptorInfo) *pa; - int ii; - - if (!pAdaptors) return; - - pa = pAdaptors; - - for (ii=0; iinum_adaptors; ii++, pa++) - { - if (pa->name) - { - Xfree(pa->name); - } - if (pa->formats) - { - Xfree(pa->formats); - } - } - - Xfree(pAdaptors); -} - -int -SDL_NAME(XvQueryEncodings)( - Display *dpy, - XvPortID port, - unsigned int *p_nEncodings, - SDL_NAME(XvEncodingInfo) **p_pEncodings -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryEncodingsReq *req; - xvQueryEncodingsReply rep; - int size, jj; - char *name; - SDL_NAME(XvEncodingInfo) *pes, *pe; - char *buffer; - union - { - char *buffer; - char *string; - xvEncodingInfo *pe; - } u; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(QueryEncodings, req); - req->port = port; - - /* READ THE REPLY */ - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadReply); - } - - size = rep.length << 2; - if ( (buffer = (char *)Xmalloc ((unsigned) size)) == NULL) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - _XRead (dpy, buffer, size); - - u.buffer = buffer; - - /* GET ENCODINGS */ - - size = rep.num_encodings*sizeof(SDL_NAME(XvEncodingInfo)); - if ( (pes = (SDL_NAME(XvEncodingInfo) *)Xmalloc(size)) == NULL) { - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - - /* INITIALIZE THE ENCODING POINTER */ - - pe = pes; - for (jj=0; jjname = (char *)NULL; - pe->num_encodings = 0; - pe++; - } - - pe = pes; - for (jj=0; jjencoding_id = u.pe->encoding; - pe->width = u.pe->width; - pe->height = u.pe->height; - pe->rate.numerator = u.pe->rate.numerator; - pe->rate.denominator = u.pe->rate.denominator; - pe->num_encodings = rep.num_encodings - jj; - - size = u.pe->name_size; - u.buffer += (sz_xvEncodingInfo + 3) & ~3; - - if ( (name = (char *)Xmalloc(size+1)) == NULL) { - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadAlloc); - } - SDL_strlcpy(name, u.string, size); - pe->name = name; - pe++; - - u.buffer += (size + 3) & ~3; - } - - *p_nEncodings = rep.num_encodings; - *p_pEncodings = pes; - - Xfree(buffer); - UnlockDisplay(dpy); - SyncHandle(); - - return (Success); -} - -void -SDL_NAME(XvFreeEncodingInfo)(SDL_NAME(XvEncodingInfo) *pEncodings) -{ - - SDL_NAME(XvEncodingInfo) *pe; - int ii; - - if (!pEncodings) return; - - pe = pEncodings; - - for (ii=0; iinum_encodings; ii++, pe++) { - if (pe->name) Xfree(pe->name); - } - - Xfree(pEncodings); -} - -int -SDL_NAME(XvPutVideo)( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - int vx, int vy, - unsigned int vw, unsigned int vh, - int dx, int dy, - unsigned int dw, unsigned int dh -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvPutVideoReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - FlushGC(dpy, gc); - - XvGetReq(PutVideo, req); - - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->vid_x = vx; - req->vid_y = vy; - req->vid_w = vw; - req->vid_h = vh; - req->drw_x = dx; - req->drw_y = dy; - req->drw_w = dw; - req->drw_h = dh; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -SDL_NAME(XvPutStill)( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - int vx, int vy, - unsigned int vw, unsigned int vh, - int dx, int dy, - unsigned int dw, unsigned int dh -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvPutStillReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - FlushGC(dpy, gc); - - XvGetReq(PutStill, req); - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->vid_x = vx; - req->vid_y = vy; - req->vid_w = vw; - req->vid_h = vh; - req->drw_x = dx; - req->drw_y = dy; - req->drw_w = dw; - req->drw_h = dh; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -SDL_NAME(XvGetVideo)( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - int vx, int vy, - unsigned int vw, unsigned int vh, - int dx, int dy, - unsigned int dw, unsigned int dh -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvGetVideoReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - FlushGC(dpy, gc); - - XvGetReq(GetVideo, req); - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->vid_x = vx; - req->vid_y = vy; - req->vid_w = vw; - req->vid_h = vh; - req->drw_x = dx; - req->drw_y = dy; - req->drw_w = dw; - req->drw_h = dh; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -SDL_NAME(XvGetStill)( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - int vx, int vy, - unsigned int vw, unsigned int vh, - int dx, int dy, - unsigned int dw, unsigned int dh -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvGetStillReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - FlushGC(dpy, gc); - - XvGetReq(GetStill, req); - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->vid_x = vx; - req->vid_y = vy; - req->vid_w = vw; - req->vid_h = vh; - req->drw_x = dx; - req->drw_y = dy; - req->drw_w = dw; - req->drw_h = dh; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -SDL_NAME(XvStopVideo)( - Display *dpy, - XvPortID port, - Drawable draw -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvStopVideoReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(StopVideo, req); - req->port = port; - req->drawable = draw; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -SDL_NAME(XvGrabPort)( - Display *dpy, - XvPortID port, - Time time -){ - XExtDisplayInfo *info = xv_find_display(dpy); - int result; - xvGrabPortReply rep; - xvGrabPortReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(GrabPort, req); - req->port = port; - req->time = time; - - if (_XReply (dpy, (xReply *) &rep, 0, xTrue) == 0) - rep.result = GrabSuccess; - - result = rep.result; - - UnlockDisplay(dpy); - SyncHandle(); - - return result; -} - -int -SDL_NAME(XvUngrabPort)( - Display *dpy, - XvPortID port, - Time time -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvUngrabPortReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(UngrabPort, req); - req->port = port; - req->time = time; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -SDL_NAME(XvSelectVideoNotify)( - Display *dpy, - Drawable drawable, - Bool onoff -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvSelectVideoNotifyReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(SelectVideoNotify, req); - req->drawable = drawable; - req->onoff = onoff; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -SDL_NAME(XvSelectPortNotify)( - Display *dpy, - XvPortID port, - Bool onoff -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvSelectPortNotifyReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(SelectPortNotify, req); - req->port = port; - req->onoff = onoff; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int -SDL_NAME(XvSetPortAttribute) ( - Display *dpy, - XvPortID port, - Atom attribute, - int value -) -{ - XExtDisplayInfo *info = xv_find_display(dpy); - xvSetPortAttributeReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(SetPortAttribute, req); - req->port = port; - req->attribute = attribute; - req->value = value; - - UnlockDisplay(dpy); - SyncHandle(); - - return (Success); -} - -int -SDL_NAME(XvGetPortAttribute) ( - Display *dpy, - XvPortID port, - Atom attribute, - int *p_value -) -{ - XExtDisplayInfo *info = xv_find_display(dpy); - xvGetPortAttributeReq *req; - xvGetPortAttributeReply rep; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(GetPortAttribute, req); - req->port = port; - req->attribute = attribute; - - /* READ THE REPLY */ - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadReply); - } - - *p_value = rep.value; - - UnlockDisplay(dpy); - SyncHandle(); - - return (Success); -} - -int -SDL_NAME(XvQueryBestSize)( - Display *dpy, - XvPortID port, - Bool motion, - unsigned int vid_w, - unsigned int vid_h, - unsigned int drw_w, - unsigned int drw_h, - unsigned int *p_actual_width, - unsigned int *p_actual_height -) -{ - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryBestSizeReq *req; - xvQueryBestSizeReply rep; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - XvGetReq(QueryBestSize, req); - req->port = port; - req->motion = motion; - req->vid_w = vid_w; - req->vid_h = vid_h; - req->drw_w = drw_w; - req->drw_h = drw_h; - - /* READ THE REPLY */ - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return(XvBadReply); - } - - *p_actual_width = rep.actual_width; - *p_actual_height = rep.actual_height; - - UnlockDisplay(dpy); - SyncHandle(); - - return (Success); -} - - -SDL_NAME(XvAttribute)* -SDL_NAME(XvQueryPortAttributes)(Display *dpy, XvPortID port, int *num) -{ - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryPortAttributesReq *req; - xvQueryPortAttributesReply rep; - SDL_NAME(XvAttribute) *ret = NULL; - - *num = 0; - - XvCheckExtension(dpy, info, NULL); - - LockDisplay(dpy); - - XvGetReq(QueryPortAttributes, req); - req->port = port; - - /* READ THE REPLY */ - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return ret; - } - - if(rep.num_attributes) { - int size = (rep.num_attributes * sizeof(SDL_NAME(XvAttribute))) + rep.text_size; - - if((ret = Xmalloc(size))) { - char* marker = (char*)(&ret[rep.num_attributes]); - xvAttributeInfo Info; - int i; - - for(i = 0; i < rep.num_attributes; i++) { - _XRead(dpy, (char*)(&Info), sz_xvAttributeInfo); - ret[i].flags = (int)Info.flags; - ret[i].min_value = Info.min; - ret[i].max_value = Info.max; - ret[i].name = marker; - _XRead(dpy, marker, Info.size); - marker += Info.size; - (*num)++; - } - } else - _XEatData(dpy, rep.length << 2); - } - - UnlockDisplay(dpy); - SyncHandle(); - - return ret; -} - -SDL_NAME(XvImageFormatValues) * SDL_NAME(XvListImageFormats) ( - Display *dpy, - XvPortID port, - int *num -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvListImageFormatsReq *req; - xvListImageFormatsReply rep; - SDL_NAME(XvImageFormatValues) *ret = NULL; - - *num = 0; - - XvCheckExtension(dpy, info, NULL); - - LockDisplay(dpy); - - XvGetReq(ListImageFormats, req); - req->port = port; - - /* READ THE REPLY */ - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { - UnlockDisplay(dpy); - SyncHandle(); - return NULL; - } - - if(rep.num_formats) { - int size = (rep.num_formats * sizeof(SDL_NAME(XvImageFormatValues))); - - if((ret = Xmalloc(size))) { - xvImageFormatInfo Info; - int i; - - for(i = 0; i < rep.num_formats; i++) { - _XRead(dpy, (char*)(&Info), sz_xvImageFormatInfo); - ret[i].id = Info.id; - ret[i].type = Info.type; - ret[i].byte_order = Info.byte_order; - memcpy(&(ret[i].guid[0]), &(Info.guid[0]), 16); - ret[i].bits_per_pixel = Info.bpp; - ret[i].format = Info.format; - ret[i].num_planes = Info.num_planes; - ret[i].depth = Info.depth; - ret[i].red_mask = Info.red_mask; - ret[i].green_mask = Info.green_mask; - ret[i].blue_mask = Info.blue_mask; - ret[i].y_sample_bits = Info.y_sample_bits; - ret[i].u_sample_bits = Info.u_sample_bits; - ret[i].v_sample_bits = Info.v_sample_bits; - ret[i].horz_y_period = Info.horz_y_period; - ret[i].horz_u_period = Info.horz_u_period; - ret[i].horz_v_period = Info.horz_v_period; - ret[i].vert_y_period = Info.vert_y_period; - ret[i].vert_u_period = Info.vert_u_period; - ret[i].vert_v_period = Info.vert_v_period; - memcpy(&(ret[i].component_order[0]), &(Info.comp_order[0]), 32); - ret[i].scanline_order = Info.scanline_order; - (*num)++; - } - } else - _XEatData(dpy, rep.length << 2); - } - - UnlockDisplay(dpy); - SyncHandle(); - - return ret; -} - -SDL_NAME(XvImage) * SDL_NAME(XvCreateImage) ( - Display *dpy, - XvPortID port, - int id, - char *data, - int width, - int height -) { - XExtDisplayInfo *info = xv_find_display(dpy); - xvQueryImageAttributesReq *req; - xvQueryImageAttributesReply rep; - SDL_NAME(XvImage) *ret = NULL; - - XvCheckExtension(dpy, info, NULL); - - LockDisplay(dpy); - - XvGetReq(QueryImageAttributes, req); - req->id = id; - req->port = port; - req->width = width; - req->height = height; - - /* READ THE REPLY */ - - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return NULL; - } - - if((ret = (SDL_NAME(XvImage)*)Xmalloc(sizeof(SDL_NAME(XvImage)) + (rep.num_planes << 3)))) { - ret->id = id; - ret->width = rep.width; - ret->height = rep.height; - ret->data_size = rep.data_size; - ret->num_planes = rep.num_planes; - ret->pitches = (int*)(&ret[1]); - ret->offsets = ret->pitches + rep.num_planes; - ret->data = data; - ret->obdata = NULL; - _XRead(dpy, (char*)(ret->pitches), rep.num_planes << 2); - _XRead(dpy, (char*)(ret->offsets), rep.num_planes << 2); - } else - _XEatData(dpy, rep.length << 2); - - UnlockDisplay(dpy); - SyncHandle(); - return ret; -} - -SDL_NAME(XvImage) * SDL_NAME(XvShmCreateImage) ( - Display *dpy, - XvPortID port, - int id, - char *data, - int width, - int height, - XShmSegmentInfo *shminfo -){ - SDL_NAME(XvImage) *ret; - - ret = SDL_NAME(XvCreateImage)(dpy, port, id, data, width, height); - - if(ret) ret->obdata = (XPointer)shminfo; - - return ret; -} - -int SDL_NAME(XvPutImage) ( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - SDL_NAME(XvImage) *image, - int src_x, - int src_y, - unsigned int src_w, - unsigned int src_h, - int dest_x, - int dest_y, - unsigned int dest_w, - unsigned int dest_h -){ - XExtDisplayInfo *info = xv_find_display(dpy); - xvPutImageReq *req; - int len; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - FlushGC(dpy, gc); - - XvGetReq(PutImage, req); - - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->id = image->id; - req->src_x = src_x; - req->src_y = src_y; - req->src_w = src_w; - req->src_h = src_h; - req->drw_x = dest_x; - req->drw_y = dest_y; - req->drw_w = dest_w; - req->drw_h = dest_h; - req->width = image->width; - req->height = image->height; - - len = (image->data_size + 3) >> 2; - SetReqLen(req, len, len); - - /* Yes it's kindof lame that we are sending the whole thing, - but for video all of it may be needed even if displaying - only a subsection, and I don't want to go through the - trouble of creating subregions to send */ - Data(dpy, (char *)image->data, image->data_size); - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - -int SDL_NAME(XvShmPutImage) ( - Display *dpy, - XvPortID port, - Drawable d, - GC gc, - SDL_NAME(XvImage) *image, - int src_x, - int src_y, - unsigned int src_w, - unsigned int src_h, - int dest_x, - int dest_y, - unsigned int dest_w, - unsigned int dest_h, - Bool send_event -){ - XExtDisplayInfo *info = xv_find_display(dpy); - XShmSegmentInfo *shminfo = (XShmSegmentInfo *)image->obdata; - xvShmPutImageReq *req; - - XvCheckExtension(dpy, info, XvBadExtension); - - LockDisplay(dpy); - - FlushGC(dpy, gc); - - XvGetReq(ShmPutImage, req); - - req->port = port; - req->drawable = d; - req->gc = gc->gid; - req->shmseg = shminfo->shmseg; - req->id = image->id; - req->src_x = src_x; - req->src_y = src_y; - req->src_w = src_w; - req->src_h = src_h; - req->drw_x = dest_x; - req->drw_y = dest_y; - req->drw_w = dest_w; - req->drw_h = dest_h; - req->offset = image->data - shminfo->shmaddr; - req->width = image->width; - req->height = image->height; - req->send_event = send_event; - - UnlockDisplay(dpy); - SyncHandle(); - - return Success; -} - - -static Bool -xv_wire_to_event(Display *dpy, XEvent *host, xEvent *wire) -{ - XExtDisplayInfo *info = xv_find_display(dpy); - SDL_NAME(XvEvent) *re = (SDL_NAME(XvEvent) *)host; - xvEvent *event = (xvEvent *)wire; - - XvCheckExtension(dpy, info, False); - - switch((event->u.u.type & 0x7F) - info->codes->first_event) - { - case XvVideoNotify: - re->xvvideo.type = event->u.u.type & 0x7f; - re->xvvideo.serial = - _XSetLastRequestRead(dpy, (xGenericReply *)event); - re->xvvideo.send_event = ((event->u.u.type & 0x80) != 0); - re->xvvideo.display = dpy; - re->xvvideo.time = event->u.videoNotify.time; - re->xvvideo.reason = event->u.videoNotify.reason; - re->xvvideo.drawable = event->u.videoNotify.drawable; - re->xvvideo.port_id = event->u.videoNotify.port; - break; - case XvPortNotify: - re->xvport.type = event->u.u.type & 0x7f; - re->xvport.serial = - _XSetLastRequestRead(dpy, (xGenericReply *)event); - re->xvport.send_event = ((event->u.u.type & 0x80) != 0); - re->xvport.display = dpy; - re->xvport.time = event->u.portNotify.time; - re->xvport.port_id = event->u.portNotify.port; - re->xvport.attribute = event->u.portNotify.attribute; - re->xvport.value = event->u.portNotify.value; - break; - default: - return False; - } - - return (True); -} - - diff --git a/apps/plugins/sdl/src/video/Xext/Xv/Xvlibint.h b/apps/plugins/sdl/src/video/Xext/Xv/Xvlibint.h deleted file mode 100644 index 20df706dc7..0000000000 --- a/apps/plugins/sdl/src/video/Xext/Xv/Xvlibint.h +++ /dev/null @@ -1,81 +0,0 @@ -/*********************************************************** -Copyright 1987 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. - -******************************************************************/ -/* $XFree86: xc/lib/Xv/Xvlibint.h,v 1.5 2001/07/25 15:04:53 dawes Exp $ */ - -#ifndef XVLIBINT_H -#define XVLIBINT_H -/* -** File: -** -** Xvlibint.h --- Xv library internal header file -** -** Author: -** -** David Carver (Digital Workstation Engineering/Project Athena) -** -** Revisions: -** -** 01.24.91 Carver -** - version 1.4 upgrade -** -*/ - -#define NEED_REPLIES - -/* Apparently some X11 systems can't include this multiple times... */ -#ifndef SDL_INCLUDED_XLIBINT_H -#define SDL_INCLUDED_XLIBINT_H 1 -#include -#endif - -#include "../extensions/Xvproto.h" -#include "../extensions/Xvlib.h" - -#if !defined(UNIXCPP) -#define XvGetReq(name, req) \ - WORD64ALIGN\ - if ((dpy->bufptr + SIZEOF(xv##name##Req)) > dpy->bufmax)\ - _XFlush(dpy);\ - req = (xv##name##Req *)(dpy->last_req = dpy->bufptr);\ - req->reqType = info->codes->major_opcode;\ - req->xvReqType = xv_##name; \ - req->length = (SIZEOF(xv##name##Req))>>2;\ - dpy->bufptr += SIZEOF(xv##name##Req);\ - dpy->request++ - -#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */ -#define XvGetReq(name, req) \ - WORD64ALIGN\ - if ((dpy->bufptr + SIZEOF(xv/**/name/**/Req)) > dpy->bufmax)\ - _XFlush(dpy);\ - req = (xv/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\ - req->reqType = info->codes->major_opcode;\ - req->xvReqType = xv_/**/name;\ - req->length = (SIZEOF(xv/**/name/**/Req))>>2;\ - dpy->bufptr += SIZEOF(xv/**/name/**/Req);\ - dpy->request++ -#endif - - -#endif /* XVLIBINT_H */ diff --git a/apps/plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA.c b/apps/plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA.c deleted file mode 100644 index fc729f1257..0000000000 --- a/apps/plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA.c +++ /dev/null @@ -1,721 +0,0 @@ -/* $XFree86: xc/lib/Xxf86dga/XF86DGA.c,v 3.19 2001/08/18 02:41:30 dawes Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995,1996 The XFree86 Project, Inc - -*/ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifdef __EMX__ /* needed here to override certain constants in X headers */ -#define INCL_DOS -#define INCL_DOSIOCTL -#include -#endif - -#if defined(linux) -#define HAS_MMAP_ANON -#include -#include -/*#include */ /* PAGE_SIZE */ -#define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */ -#define HAS_GETPAGESIZE -#endif /* linux */ - -#if defined(CSRG_BASED) -#define HAS_MMAP_ANON -#define HAS_GETPAGESIZE -#include -#include -#endif /* CSRG_BASED */ - -#if defined(DGUX) -#define HAS_GETPAGESIZE -#define MMAP_DEV_ZERO -#include -#include -#include -#endif /* DGUX */ - -#if defined(SVR4) && !defined(DGUX) -#define MMAP_DEV_ZERO -#include -#include -#include -#endif /* SVR4 && !DGUX */ - -#if defined(sun) && !defined(SVR4) /* SunOS */ -#define MMAP_DEV_ZERO /* doesn't SunOS have MAP_ANON ?? */ -#define HAS_GETPAGESIZE -#include -#include -#endif /* sun && !SVR4 */ - -#ifdef XNO_SYSCONF -#undef _SC_PAGESIZE -#endif - -#define NEED_EVENTS -#define NEED_REPLIES - -/* Apparently some X11 systems can't include this multiple times... */ -#ifndef SDL_INCLUDED_XLIBINT_H -#define SDL_INCLUDED_XLIBINT_H 1 -#include -#endif - -#include "../extensions/xf86dga.h" -#include "../extensions/xf86dgastr.h" -#include "../extensions/Xext.h" -#include "../extensions/extutil.h" - -extern XExtDisplayInfo* SDL_NAME(xdga_find_display)(Display*); -extern char *SDL_NAME(xdga_extension_name); - -#define XF86DGACheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, SDL_NAME(xdga_extension_name), val) - -/***************************************************************************** - * * - * public XFree86-DGA Extension routines * - * * - *****************************************************************************/ - -Bool SDL_NAME(XF86DGAQueryExtension) ( - Display *dpy, - int *event_basep, - int *error_basep -){ - return SDL_NAME(XDGAQueryExtension)(dpy, event_basep, error_basep); -} - -Bool SDL_NAME(XF86DGAQueryVersion)( - Display* dpy, - int* majorVersion, - int* minorVersion -){ - return SDL_NAME(XDGAQueryVersion)(dpy, majorVersion, minorVersion); -} - -Bool SDL_NAME(XF86DGAGetVideoLL)( - Display* dpy, - int screen, - int *offset, - int *width, - int *bank_size, - int *ram_size -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXF86DGAGetVideoLLReply rep; - xXF86DGAGetVideoLLReq *req; - - XF86DGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DGAGetVideoLL, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XF86DGAGetVideoLL; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - *offset = /*(char *)*/rep.offset; - *width = rep.width; - *bank_size = rep.bank_size; - *ram_size = rep.ram_size; - - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - - -Bool SDL_NAME(XF86DGADirectVideoLL)( - Display* dpy, - int screen, - int enable -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXF86DGADirectVideoReq *req; - - XF86DGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DGADirectVideo, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XF86DGADirectVideo; - req->screen = screen; - req->enable = enable; - UnlockDisplay(dpy); - SyncHandle(); - XSync(dpy,False); - return True; -} - -Bool SDL_NAME(XF86DGAGetViewPortSize)( - Display* dpy, - int screen, - int *width, - int *height -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXF86DGAGetViewPortSizeReply rep; - xXF86DGAGetViewPortSizeReq *req; - - XF86DGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DGAGetViewPortSize, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XF86DGAGetViewPortSize; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - *width = rep.width; - *height = rep.height; - - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - - -Bool SDL_NAME(XF86DGASetViewPort)( - Display* dpy, - int screen, - int x, - int y -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXF86DGASetViewPortReq *req; - - XF86DGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DGASetViewPort, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XF86DGASetViewPort; - req->screen = screen; - req->x = x; - req->y = y; - UnlockDisplay(dpy); - SyncHandle(); - XSync(dpy,False); - return True; -} - - -Bool SDL_NAME(XF86DGAGetVidPage)( - Display* dpy, - int screen, - int *vpage -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXF86DGAGetVidPageReply rep; - xXF86DGAGetVidPageReq *req; - - XF86DGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DGAGetVidPage, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XF86DGAGetVidPage; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - *vpage = rep.vpage; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - - -Bool SDL_NAME(XF86DGASetVidPage)( - Display* dpy, - int screen, - int vpage -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXF86DGASetVidPageReq *req; - - XF86DGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DGASetVidPage, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XF86DGASetVidPage; - req->screen = screen; - req->vpage = vpage; - UnlockDisplay(dpy); - SyncHandle(); - XSync(dpy,False); - return True; -} - -Bool SDL_NAME(XF86DGAInstallColormap)( - Display* dpy, - int screen, - Colormap cmap -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXF86DGAInstallColormapReq *req; - - XF86DGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DGAInstallColormap, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XF86DGAInstallColormap; - req->screen = screen; - req->id = cmap; - UnlockDisplay(dpy); - SyncHandle(); - XSync(dpy,False); - return True; -} - -Bool SDL_NAME(XF86DGAQueryDirectVideo)( - Display *dpy, - int screen, - int *flags -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXF86DGAQueryDirectVideoReply rep; - xXF86DGAQueryDirectVideoReq *req; - - XF86DGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DGAQueryDirectVideo, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XF86DGAQueryDirectVideo; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *flags = rep.flags; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool SDL_NAME(XF86DGAViewPortChanged)( - Display *dpy, - int screen, - int n -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXF86DGAViewPortChangedReply rep; - xXF86DGAViewPortChangedReq *req; - - XF86DGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86DGAViewPortChanged, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XF86DGAViewPortChanged; - req->screen = screen; - req->n = n; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - UnlockDisplay(dpy); - SyncHandle(); - return rep.result; -} - - - -/* Helper functions */ - -#include -#include "../extensions/xf86dga.h" -#include -#include -#include -#if defined(ISC) -# define HAS_SVR3_MMAP -# include -# include - -# include -# include - -# include -# include -# include - -# include -#else -# if !defined(Lynx) -# if !defined(__EMX__) -# include -# endif -# else -# include -# include -# include -# endif -#endif -#include -#include -#include - -#if defined(SVR4) && !defined(sun) && !defined(SCO325) -#define DEV_MEM "/dev/pmem" -#elif defined(SVR4) && defined(sun) -#define DEV_MEM "/dev/xsvc" -#else -#define DEV_MEM "/dev/mem" -#endif - -typedef struct { - unsigned long physaddr; /* actual requested physical address */ - unsigned long size; /* actual requested map size */ - unsigned long delta; /* delta to account for page alignment */ - void * vaddr; /* mapped address, without the delta */ - int refcount; /* reference count */ -} MapRec, *MapPtr; - -typedef struct { - Display * display; - int screen; - MapPtr map; -} ScrRec, *ScrPtr; - -static int mapFd = -1; -static int numMaps = 0; -static int numScrs = 0; -static MapPtr *mapList = NULL; -static ScrPtr *scrList = NULL; - -static MapPtr -AddMap(void) -{ - MapPtr *old; - - old = mapList; - mapList = realloc(mapList, sizeof(MapPtr) * (numMaps + 1)); - if (!mapList) { - mapList = old; - return NULL; - } - mapList[numMaps] = malloc(sizeof(MapRec)); - if (!mapList[numMaps]) - return NULL; - return mapList[numMaps++]; -} - -static ScrPtr -AddScr(void) -{ - ScrPtr *old; - - old = scrList; - scrList = realloc(scrList, sizeof(ScrPtr) * (numScrs + 1)); - if (!scrList) { - scrList = old; - return NULL; - } - scrList[numScrs] = malloc(sizeof(ScrRec)); - if (!scrList[numScrs]) - return NULL; - return scrList[numScrs++]; -} - -static MapPtr -FindMap(unsigned long address, unsigned long size) -{ - int i; - - for (i = 0; i < numMaps; i++) { - if (mapList[i]->physaddr == address && - mapList[i]->size == size) - return mapList[i]; - } - return NULL; -} - -static ScrPtr -FindScr(Display *display, int screen) -{ - int i; - - for (i = 0; i < numScrs; i++) { - if (scrList[i]->display == display && - scrList[i]->screen == screen) - return scrList[i]; - } - return NULL; -} - -static void * -MapPhysAddress(unsigned long address, unsigned long size) -{ - unsigned long offset, delta; - int pagesize = -1; - void *vaddr; - MapPtr mp; -#if defined(ISC) && defined(HAS_SVR3_MMAP) - struct kd_memloc mloc; -#elif defined(__EMX__) - APIRET rc; - ULONG action; - HFILE hfd; -#endif - - if ((mp = FindMap(address, size))) { - mp->refcount++; - return (void *)((unsigned long)mp->vaddr + mp->delta); - } - -#if defined(_SC_PAGESIZE) && defined(HAS_SC_PAGESIZE) - pagesize = sysconf(_SC_PAGESIZE); -#endif -#ifdef _SC_PAGE_SIZE - if (pagesize == -1) - pagesize = sysconf(_SC_PAGE_SIZE); -#endif -#ifdef HAS_GETPAGESIZE - if (pagesize == -1) - pagesize = getpagesize(); -#endif -#ifdef PAGE_SIZE - if (pagesize == -1) - pagesize = PAGE_SIZE; -#endif - if (pagesize == -1) - pagesize = 4096; - - delta = address % pagesize; - offset = address - delta; - -#if defined(ISC) && defined(HAS_SVR3_MMAP) - if (mapFd < 0) { - if ((mapFd = open("/dev/mmap", O_RDWR)) < 0) - return NULL; - } - mloc.vaddr = (char *)0; - mloc.physaddr = (char *)offset; - mloc.length = size + delta; - mloc.ioflg=1; - - if ((vaddr = (void *)ioctl(mapFd, MAP, &mloc)) == (void *)-1) - return NULL; -#elif defined (__EMX__) - /* - * Dragon warning here! /dev/pmap$ is never closed, except on progam exit. - * Consecutive calling of this routine will make PMAP$ driver run out - * of memory handles. Some umap/close mechanism should be provided - */ - - rc = DosOpen("/dev/pmap$", &hfd, &action, 0, FILE_NORMAL, FILE_OPEN, - OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYNONE, (PEAOP2)NULL); - if (rc != 0) - return NULL; - { - struct map_ioctl { - union { - ULONG phys; - void* user; - } a; - ULONG size; - } pmap,dmap; - ULONG plen,dlen; -#define XFREE86_PMAP 0x76 -#define PMAP_MAP 0x44 - - pmap.a.phys = offset; - pmap.size = size + delta; - rc = DosDevIOCtl(hfd, XFREE86_PMAP, PMAP_MAP, - (PULONG)&pmap, sizeof(pmap), &plen, - (PULONG)&dmap, sizeof(dmap), &dlen); - if (rc == 0) { - vaddr = dmap.a.user; - } - } - if (rc != 0) - return NULL; -#elif defined (Lynx) - vaddr = (void *)smem_create("XF86DGA", (char *)offset, - size + delta, SM_READ|SM_WRITE); -#else -#ifndef MAP_FILE -#define MAP_FILE 0 -#endif - if (mapFd < 0) { - if ((mapFd = open(DEV_MEM, O_RDWR)) < 0) - return NULL; - } - vaddr = (void *)mmap(NULL, size + delta, PROT_READ | PROT_WRITE, - MAP_FILE | MAP_SHARED, mapFd, (off_t)offset); - if (vaddr == (void *)-1) - return NULL; -#endif - - if (!vaddr) { - if (!(mp = AddMap())) - return NULL; - mp->physaddr = address; - mp->size = size; - mp->delta = delta; - mp->vaddr = vaddr; - mp->refcount = 1; - } - return (void *)((unsigned long)vaddr + delta); -} - -/* - * Still need to find a clean way of detecting the death of a DGA app - * and returning things to normal - Jon - * This is here to help debugging without rebooting... Also C-A-BS - * should restore text mode. - */ - -int -SDL_NAME(XF86DGAForkApp)(int screen) -{ - pid_t pid; - int status; - int i; - - /* fork the app, parent hangs around to clean up */ - if ((pid = fork()) > 0) { - ScrPtr sp; - - waitpid(pid, &status, 0); - for (i = 0; i < numScrs; i++) { - sp = scrList[i]; - SDL_NAME(XF86DGADirectVideoLL)(sp->display, sp->screen, 0); - XSync(sp->display, False); - } - if (WIFEXITED(status)) - _exit(0); - else - _exit(-1); - } - return pid; -} - - -Bool -SDL_NAME(XF86DGADirectVideo)( - Display *dis, - int screen, - int enable -){ - ScrPtr sp; - MapPtr mp = NULL; - - if ((sp = FindScr(dis, screen))) - mp = sp->map; - - if (enable & XF86DGADirectGraphics) { -#if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \ - && !defined(__EMX__) - if (mp && mp->vaddr) - mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ | PROT_WRITE); -#endif - } else { -#if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \ - && !defined(__EMX__) - if (mp && mp->vaddr) - mprotect(mp->vaddr, mp->size + mp->delta, PROT_READ); -#elif defined(Lynx) - /* XXX this doesn't allow enable after disable */ - smem_create(NULL, mp->vaddr, mp->size + mp->delta, SM_DETACH); - smem_remove("XF86DGA"); -#endif - } - - SDL_NAME(XF86DGADirectVideoLL)(dis, screen, enable); - return 1; -} - - -static void -XF86cleanup(int sig) -{ - ScrPtr sp; - int i; - static char beenhere = 0; - - if (beenhere) - _exit(3); - beenhere = 1; - - for (i = 0; i < numScrs; i++) { - sp = scrList[i]; - SDL_NAME(XF86DGADirectVideo)(sp->display, sp->screen, 0); - XSync(sp->display, False); - } - _exit(3); -} - -Bool -SDL_NAME(XF86DGAGetVideo)( - Display *dis, - int screen, - char **addr, - int *width, - int *bank, - int *ram -){ - /*unsigned long*/ int offset; - static int beenHere = 0; - ScrPtr sp; - MapPtr mp; - - if (!(sp = FindScr(dis, screen))) { - if (!(sp = AddScr())) { - fprintf(stderr, "XF86DGAGetVideo: malloc failure\n"); - exit(-2); - } - sp->display = dis; - sp->screen = screen; - sp->map = NULL; - } - - SDL_NAME(XF86DGAGetVideoLL)(dis, screen , &offset, width, bank, ram); - - *addr = MapPhysAddress(offset, *bank); - if (*addr == NULL) { - fprintf(stderr, "XF86DGAGetVideo: failed to map video memory (%s)\n", - strerror(errno)); - exit(-2); - } - - if ((mp = FindMap(offset, *bank))) - sp->map = mp; - - if (!beenHere) { - beenHere = 1; - atexit((void(*)(void))XF86cleanup); - /* one shot XF86cleanup attempts */ - signal(SIGSEGV, XF86cleanup); -#ifdef SIGBUS - signal(SIGBUS, XF86cleanup); -#endif - signal(SIGHUP, XF86cleanup); - signal(SIGFPE, XF86cleanup); - } - - return 1; -} - diff --git a/apps/plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA2.c b/apps/plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA2.c deleted file mode 100644 index 11d4fddc6a..0000000000 --- a/apps/plugins/sdl/src/video/Xext/Xxf86dga/XF86DGA2.c +++ /dev/null @@ -1,993 +0,0 @@ -/* $XFree86: xc/lib/Xxf86dga/XF86DGA2.c,v 1.18 2001/08/17 13:27:51 dawes Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995,1996 The XFree86 Project, Inc - -*/ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#ifdef __EMX__ /* needed here to override certain constants in X headers */ -#define INCL_DOS -#define INCL_DOSIOCTL -#include -#endif - -#define NEED_EVENTS -#define NEED_REPLIES - -/* Apparently some X11 systems can't include this multiple times... */ -#ifndef SDL_INCLUDED_XLIBINT_H -#define SDL_INCLUDED_XLIBINT_H 1 -#include -#endif - -#include "../extensions/xf86dga.h" -#include "../extensions/xf86dgastr.h" -#include "../extensions/Xext.h" -#include "../extensions/extutil.h" -#include - -#if defined(ENABLE_FBCON) /* Needed for framebuffer console support */ -#include -#include -#endif - -/* If you change this, change the Bases[] array below as well */ -#define MAX_HEADS 16 - -char *SDL_NAME(xdga_extension_name) = XF86DGANAME; - -static XExtensionInfo _xdga_info_data; -static XExtensionInfo *xdga_info = &_xdga_info_data; - - -Bool SDL_NAME(XDGAMapFramebuffer)(int, char *, unsigned char*, CARD32, CARD32, CARD32); -void SDL_NAME(XDGAUnmapFramebuffer)(int); -unsigned char* SDL_NAME(XDGAGetMappedMemory)(int); - -#define XDGACheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, SDL_NAME(xdga_extension_name), val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static int xdga_close_display(Display *dpy, XExtCodes *codes); -static Bool xdga_wire_to_event(Display *dpy, XEvent *event, xEvent *wire_ev); -static Status xdga_event_to_wire(Display *dpy, XEvent *event, xEvent *wire_ev); - -static XExtensionHooks xdga_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - xdga_close_display, /* close_display */ - xdga_wire_to_event, /* wire_to_event */ - xdga_event_to_wire, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_CLOSE_DISPLAY (xdga_close_display, xdga_info) - - -XEXT_GENERATE_FIND_DISPLAY (SDL_NAME(xdga_find_display), xdga_info, - "XFree86-DGA", - &xdga_extension_hooks, - 0, NULL) - - -static Status -xdga_event_to_wire( - Display *dpy, - XEvent *event, - xEvent *wire_ev -){ - return True; -} - -static Bool -xdga_wire_to_event( - Display *dpy, - XEvent *event, - xEvent *wire_ev -){ - dgaEvent *wire = (dgaEvent *) wire_ev; - SDL_NAME(XDGAButtonEvent) *bevent; - SDL_NAME(XDGAKeyEvent) *kevent; - SDL_NAME(XDGAMotionEvent) *mevent; - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - - XDGACheckExtension (dpy, info, False); - - switch((wire->u.u.type & 0x7f) - info->codes->first_event) { - case MotionNotify: - mevent = (SDL_NAME(XDGAMotionEvent)*)event; - mevent->type = wire->u.u.type & 0x7F; - mevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *)wire); - mevent->display = dpy; - mevent->screen = wire->u.event.screen; - mevent->time = wire->u.event.time; - mevent->state = wire->u.event.state; - mevent->dx = wire->u.event.dx; - mevent->dy = wire->u.event.dy; - return True; - case ButtonPress: - case ButtonRelease: - bevent = (SDL_NAME(XDGAButtonEvent)*)event; - bevent->type = wire->u.u.type & 0x7F; - bevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *)wire); - bevent->display = dpy; - bevent->screen = wire->u.event.screen; - bevent->time = wire->u.event.time; - bevent->state = wire->u.event.state; - bevent->button = wire->u.u.detail; - return True; - case KeyPress: - case KeyRelease: - kevent = (SDL_NAME(XDGAKeyEvent)*)event; - kevent->type = wire->u.u.type & 0x7F; - kevent->serial = _XSetLastRequestRead(dpy, (xGenericReply *)wire); - kevent->display = dpy; - kevent->screen = wire->u.event.screen; - kevent->time = wire->u.event.time; - kevent->state = wire->u.event.state; - kevent->keycode = wire->u.u.detail; - return True; - } - - return False; -} - - -Bool SDL_NAME(XDGAQueryExtension) ( - Display *dpy, - int *event_basep, - int *error_basep -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - - -Bool SDL_NAME(XDGAQueryVersion)( - Display *dpy, - int *majorVersion, - int *minorVersion -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGAQueryVersionReply rep; - xXDGAQueryVersionReq *req; - - XDGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XDGAQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGAQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - UnlockDisplay(dpy); - SyncHandle(); - if (*majorVersion >= 2) - { - int i, j; - - for (i = 0, j = info->codes->first_event; - i < XF86DGANumberEvents; - i++, j++) - { - XESetWireToEvent(dpy, j, xdga_wire_to_event); - XESetEventToWire(dpy, j, xdga_event_to_wire); - } - SDL_NAME(XDGASetClientVersion)(dpy); - } - return True; -} - -Bool SDL_NAME(XDGASetClientVersion)( - Display *dpy -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGASetClientVersionReq *req; - - XDGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XDGASetClientVersion, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGASetClientVersion; - req->major = XDGA_MAJOR_VERSION; - req->minor = XDGA_MINOR_VERSION; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool SDL_NAME(XDGAOpenFramebuffer)( - Display *dpy, - int screen -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGAOpenFramebufferReply rep; - xXDGAOpenFramebufferReq *req; - char *deviceName = NULL; - Bool ret; - - XDGACheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XDGAOpenFramebuffer, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGAOpenFramebuffer; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - if(rep.length) { - deviceName = Xmalloc(rep.length << 2); - _XRead(dpy, deviceName, rep.length << 2); - } - - ret = SDL_NAME(XDGAMapFramebuffer)(screen, deviceName, - (unsigned char*)(long)rep.mem1, - rep.size, rep.offset, rep.extra); - - if(deviceName) - Xfree(deviceName); - - UnlockDisplay(dpy); - SyncHandle(); - return ret; -} - -void SDL_NAME(XDGACloseFramebuffer)( - Display *dpy, - int screen -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGACloseFramebufferReq *req; - - XextSimpleCheckExtension (dpy, info, SDL_NAME(xdga_extension_name)); - - SDL_NAME(XDGAUnmapFramebuffer)(screen); - - LockDisplay(dpy); - GetReq(XDGACloseFramebuffer, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGACloseFramebuffer; - req->screen = screen; - UnlockDisplay(dpy); - SyncHandle(); -} - - - -SDL_NAME(XDGAMode)* SDL_NAME(XDGAQueryModes)( - Display *dpy, - int screen, - int *num -){ - XExtDisplayInfo *dinfo = SDL_NAME(xdga_find_display) (dpy); - xXDGAQueryModesReply rep; - xXDGAQueryModesReq *req; - SDL_NAME(XDGAMode) *modes = NULL; - - *num = 0; - - XDGACheckExtension (dpy, dinfo, NULL); - - LockDisplay(dpy); - GetReq(XDGAQueryModes, req); - req->reqType = dinfo->codes->major_opcode; - req->dgaReqType = X_XDGAQueryModes; - req->screen = screen; - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - if(rep.length) { - xXDGAModeInfo info; - int i, size; - char *offset; - - size = rep.length << 2; - size -= rep.number * sz_xXDGAModeInfo; /* find text size */ - modes = (SDL_NAME(XDGAMode)*)Xmalloc((rep.number * sizeof(SDL_NAME(XDGAMode))) + size); - offset = (char*)(&modes[rep.number]); /* start of text */ - - - if(modes) { - for(i = 0; i < rep.number; i++) { - _XRead(dpy, (char*)(&info), sz_xXDGAModeInfo); - - modes[i].num = info.num; - modes[i].verticalRefresh = - (float)info.vsync_num / (float)info.vsync_den; - modes[i].flags = info.flags; - modes[i].imageWidth = info.image_width; - modes[i].imageHeight = info.image_height; - modes[i].pixmapWidth = info.pixmap_width; - modes[i].pixmapHeight = info.pixmap_height; - modes[i].bytesPerScanline = info.bytes_per_scanline; - modes[i].byteOrder = info.byte_order; - modes[i].depth = info.depth; - modes[i].bitsPerPixel = info.bpp; - modes[i].redMask = info.red_mask; - modes[i].greenMask = info.green_mask; - modes[i].blueMask = info.blue_mask; - modes[i].visualClass = info.visual_class; - modes[i].viewportWidth = info.viewport_width; - modes[i].viewportHeight = info.viewport_height; - modes[i].xViewportStep = info.viewport_xstep; - modes[i].yViewportStep = info.viewport_ystep; - modes[i].maxViewportX = info.viewport_xmax; - modes[i].maxViewportY = info.viewport_ymax; - modes[i].viewportFlags = info.viewport_flags; - modes[i].reserved1 = info.reserved1; - modes[i].reserved2 = info.reserved2; - - _XRead(dpy, offset, info.name_size); - modes[i].name = offset; - offset += info.name_size; - } - *num = rep.number; - } else - _XEatData(dpy, rep.length << 2); - } - } - - UnlockDisplay(dpy); - SyncHandle(); - - return modes; -} - - -SDL_NAME(XDGADevice) * -SDL_NAME(XDGASetMode)( - Display *dpy, - int screen, - int mode -){ - XExtDisplayInfo *dinfo = SDL_NAME(xdga_find_display) (dpy); - xXDGASetModeReply rep; - xXDGASetModeReq *req; - SDL_NAME(XDGADevice) *dev = NULL; - Pixmap pid; - - XDGACheckExtension (dpy, dinfo, NULL); - - LockDisplay(dpy); - GetReq(XDGASetMode, req); - req->reqType = dinfo->codes->major_opcode; - req->dgaReqType = X_XDGASetMode; - req->screen = screen; - req->mode = mode; - req->pid = pid = XAllocID(dpy); - - if (_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - if(rep.length) { - xXDGAModeInfo info; - int size; - - size = rep.length << 2; - size -= sz_xXDGAModeInfo; /* get text size */ - - dev = (SDL_NAME(XDGADevice)*)Xmalloc(sizeof(SDL_NAME(XDGADevice)) + size); - - if(dev) { - _XRead(dpy, (char*)(&info), sz_xXDGAModeInfo); - - dev->mode.num = info.num; - dev->mode.verticalRefresh = - (float)info.vsync_num / (float)info.vsync_den; - dev->mode.flags = info.flags; - dev->mode.imageWidth = info.image_width; - dev->mode.imageHeight = info.image_height; - dev->mode.pixmapWidth = info.pixmap_width; - dev->mode.pixmapHeight = info.pixmap_height; - dev->mode.bytesPerScanline = info.bytes_per_scanline; - dev->mode.byteOrder = info.byte_order; - dev->mode.depth = info.depth; - dev->mode.bitsPerPixel = info.bpp; - dev->mode.redMask = info.red_mask; - dev->mode.greenMask = info.green_mask; - dev->mode.blueMask = info.blue_mask; - dev->mode.visualClass = info.visual_class; - dev->mode.viewportWidth = info.viewport_width; - dev->mode.viewportHeight = info.viewport_height; - dev->mode.xViewportStep = info.viewport_xstep; - dev->mode.yViewportStep = info.viewport_ystep; - dev->mode.maxViewportX = info.viewport_xmax; - dev->mode.maxViewportY = info.viewport_ymax; - dev->mode.viewportFlags = info.viewport_flags; - dev->mode.reserved1 = info.reserved1; - dev->mode.reserved2 = info.reserved2; - - dev->mode.name = (char*)(&dev[1]); - _XRead(dpy, dev->mode.name, info.name_size); - - dev->pixmap = (rep.flags & XDGAPixmap) ? pid : 0; - dev->data = SDL_NAME(XDGAGetMappedMemory)(screen); - - if(dev->data) - dev->data += rep.offset; - } - /* not sure what to do if the allocation fails */ - } - } - - UnlockDisplay(dpy); - SyncHandle(); - - return dev; -} - - -void SDL_NAME(XDGASetViewport)( - Display *dpy, - int screen, - int x, - int y, - int flags -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGASetViewportReq *req; - - XextSimpleCheckExtension (dpy, info, SDL_NAME(xdga_extension_name)); - - LockDisplay(dpy); - GetReq(XDGASetViewport, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGASetViewport; - req->screen = screen; - req->x = x; - req->y = y; - req->flags = flags; - UnlockDisplay(dpy); - SyncHandle(); -} - - -void SDL_NAME(XDGAInstallColormap)( - Display *dpy, - int screen, - Colormap cmap -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGAInstallColormapReq *req; - - XextSimpleCheckExtension (dpy, info, SDL_NAME(xdga_extension_name)); - - LockDisplay(dpy); - GetReq(XDGAInstallColormap, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGAInstallColormap; - req->screen = screen; - req->cmap = cmap; - UnlockDisplay(dpy); - SyncHandle(); -} - -void SDL_NAME(XDGASelectInput)( - Display *dpy, - int screen, - long mask -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGASelectInputReq *req; - - XextSimpleCheckExtension (dpy, info, SDL_NAME(xdga_extension_name)); - - LockDisplay(dpy); - GetReq(XDGASelectInput, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGASelectInput; - req->screen = screen; - req->mask = mask; - UnlockDisplay(dpy); - SyncHandle(); -} - -void SDL_NAME(XDGAFillRectangle)( - Display *dpy, - int screen, - int x, - int y, - unsigned int width, - unsigned int height, - unsigned long color -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGAFillRectangleReq *req; - - XextSimpleCheckExtension (dpy, info, SDL_NAME(xdga_extension_name)); - - LockDisplay(dpy); - GetReq(XDGAFillRectangle, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGAFillRectangle; - req->screen = screen; - req->x = x; - req->y = y; - req->width = width; - req->height = height; - req->color = color; - UnlockDisplay(dpy); - SyncHandle(); -} - -void SDL_NAME(XDGACopyArea)( - Display *dpy, - int screen, - int srcx, - int srcy, - unsigned int width, - unsigned int height, - int dstx, - int dsty -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGACopyAreaReq *req; - - XextSimpleCheckExtension (dpy, info, SDL_NAME(xdga_extension_name)); - - LockDisplay(dpy); - GetReq(XDGACopyArea, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGACopyArea; - req->screen = screen; - req->srcx = srcx; - req->srcy = srcy; - req->width = width; - req->height = height; - req->dstx = dstx; - req->dsty = dsty; - UnlockDisplay(dpy); - SyncHandle(); -} - -void SDL_NAME(XDGACopyTransparentArea)( - Display *dpy, - int screen, - int srcx, - int srcy, - unsigned int width, - unsigned int height, - int dstx, - int dsty, - unsigned long key -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGACopyTransparentAreaReq *req; - - XextSimpleCheckExtension (dpy, info, SDL_NAME(xdga_extension_name)); - - LockDisplay(dpy); - GetReq(XDGACopyTransparentArea, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGACopyTransparentArea; - req->screen = screen; - req->srcx = srcx; - req->srcy = srcy; - req->width = width; - req->height = height; - req->dstx = dstx; - req->dsty = dsty; - req->key = key; - UnlockDisplay(dpy); - SyncHandle(); -} - - -int SDL_NAME(XDGAGetViewportStatus)( - Display *dpy, - int screen -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGAGetViewportStatusReply rep; - xXDGAGetViewportStatusReq *req; - int status = 0; - - XDGACheckExtension (dpy, info, 0); - - LockDisplay(dpy); - GetReq(XDGAGetViewportStatus, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGAGetViewportStatus; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) - status = rep.status; - UnlockDisplay(dpy); - SyncHandle(); - return status; -} - -void SDL_NAME(XDGASync)( - Display *dpy, - int screen -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGASyncReply rep; - xXDGASyncReq *req; - - XextSimpleCheckExtension (dpy, info, SDL_NAME(xdga_extension_name)); - - LockDisplay(dpy); - GetReq(XDGASync, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGASync; - req->screen = screen; - _XReply(dpy, (xReply *)&rep, 0, xFalse); - UnlockDisplay(dpy); - SyncHandle(); -} - - -void SDL_NAME(XDGAChangePixmapMode)( - Display *dpy, - int screen, - int *x, - int *y, - int mode -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGAChangePixmapModeReq *req; - xXDGAChangePixmapModeReply rep; - - XextSimpleCheckExtension (dpy, info, SDL_NAME(xdga_extension_name)); - - LockDisplay(dpy); - GetReq(XDGAChangePixmapMode, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGAChangePixmapMode; - req->screen = screen; - req->x = *x; - req->y = *y; - req->flags = mode; - _XReply(dpy, (xReply *)&rep, 0, xFalse); - *x = rep.x; - *y = rep.y; - UnlockDisplay(dpy); - SyncHandle(); -} - -Colormap SDL_NAME(XDGACreateColormap)( - Display *dpy, - int screen, - SDL_NAME(XDGADevice) *dev, - int alloc -){ - XExtDisplayInfo *info = SDL_NAME(xdga_find_display) (dpy); - xXDGACreateColormapReq *req; - Colormap cid; - - XDGACheckExtension (dpy, info, -1); - - LockDisplay(dpy); - GetReq(XDGACreateColormap, req); - req->reqType = info->codes->major_opcode; - req->dgaReqType = X_XDGACreateColormap; - req->screen = screen; - req->mode = dev->mode.num; - req->alloc = alloc; - cid = req->id = XAllocID(dpy); - UnlockDisplay(dpy); - SyncHandle(); - - return cid; -} - - -void SDL_NAME(XDGAKeyEventToXKeyEvent)( - SDL_NAME(XDGAKeyEvent)* dk, - XKeyEvent* xk -){ - xk->type = dk->type; - xk->serial = dk->serial; - xk->send_event = False; - xk->display = dk->display; - xk->window = RootWindow(dk->display, dk->screen); - xk->root = xk->window; - xk->subwindow = None; - xk->time = dk->time; - xk->x = xk->y = xk->x_root = xk->y_root = 0; - xk->state = dk->state; - xk->keycode = dk->keycode; - xk->same_screen = True; -} - -#include -#include -#include -#include -#if defined(ISC) -# define HAS_SVR3_MMAP -# include -# include - -# include -# include - -# include -# include -# include - -# include -#else -# if !defined(Lynx) -# if !defined(__EMX__) -# include -# endif -# else -# include -# include -# include -# endif -#endif -#include -#include -#include - -#if defined(SVR4) && !defined(sun) && !defined(SCO325) -#define DEV_MEM "/dev/pmem" -#elif defined(SVR4) && defined(sun) -#define DEV_MEM "/dev/xsvc" -#else -#define DEV_MEM "/dev/mem" -#endif - - - -typedef struct _DGAMapRec{ - unsigned char *physical; - unsigned char *virtual; - CARD32 size; - int fd; - int screen; - struct _DGAMapRec *next; -} DGAMapRec, *DGAMapPtr; - -static Bool -DGAMapPhysical(int, char*, unsigned char*, CARD32, CARD32, CARD32, DGAMapPtr); -static void DGAUnmapPhysical(DGAMapPtr); - -static DGAMapPtr _Maps = NULL; - - -unsigned char* -SDL_NAME(XDGAGetMappedMemory)(int screen) -{ - DGAMapPtr pMap = _Maps; - unsigned char *pntr = NULL; - - while(pMap != NULL) { - if(pMap->screen == screen) { - pntr = pMap->virtual; - break; - } - pMap = pMap->next; - } - - return pntr; -} - -Bool -SDL_NAME(XDGAMapFramebuffer)( - int screen, - char *name, /* optional device name */ - unsigned char* base, /* physical memory */ - CARD32 size, /* size */ - CARD32 offset, /* optional offset */ - CARD32 extra /* optional extra data */ -){ - DGAMapPtr pMap = _Maps; - Bool result; - - /* is it already mapped ? */ - while(pMap != NULL) { - if(pMap->screen == screen) - return True; - pMap = pMap->next; - } - - if(extra & XDGANeedRoot) { - /* we should probably check if we have root permissions and - return False here */ - - } - - pMap = (DGAMapPtr)Xmalloc(sizeof(DGAMapRec)); - - result = DGAMapPhysical(screen, name, base, size, offset, extra, pMap); - - if(result) { - pMap->next = _Maps; - _Maps = pMap; - } else - Xfree(pMap); - - return result; -} - -void -SDL_NAME(XDGAUnmapFramebuffer)(int screen) -{ - DGAMapPtr pMap = _Maps; - DGAMapPtr pPrev = NULL; - - /* is it already mapped */ - while(pMap != NULL) { - if(pMap->screen == screen) - break; - pPrev = pMap; - pMap = pMap->next; - } - - if(!pMap) - return; - - DGAUnmapPhysical(pMap); - - if(!pPrev) - _Maps = pMap->next; - else - pPrev->next = pMap->next; - - Xfree(pMap); -} - - -static Bool -DGAMapPhysical( - int screen, - char *name, /* optional device name */ - unsigned char* base, /* physical memory */ - CARD32 size, /* size */ - CARD32 offset, /* optional offset */ - CARD32 extra, /* optional extra data */ - DGAMapPtr pMap -) { -#if defined(ISC) && defined(HAS_SVR3_MMAP) - struct kd_memloc mloc; -#elif defined(__EMX__) - APIRET rc; - ULONG action; - HFILE hfd; -#endif - - base += offset; - - pMap->screen = screen; - pMap->physical = base; - pMap->size = size; - -#if defined(ISC) && defined(HAS_SVR3_MMAP) - if ((pMap->fd = open("/dev/mmap", O_RDWR)) < 0) - return False; - mloc.vaddr = (char *)0; - mloc.physaddr = (char *)base; - mloc.length = size; - mloc.ioflg=1; - - if ((pMap->virtual = (void *)ioctl(pMap->fd, MAP, &mloc)) == (void *)-1) - return False; -#elif defined (__EMX__) - /* - * Dragon warning here! /dev/pmap$ is never closed, except on progam exit. - * Consecutive calling of this routine will make PMAP$ driver run out - * of memory handles. Some umap/close mechanism should be provided - */ - - rc = DosOpen("/dev/pmap$", &hfd, &action, 0, FILE_NORMAL, FILE_OPEN, - OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYNONE, (PEAOP2)NULL); - if (rc != 0) - return False; - { - struct map_ioctl { - union { - ULONG phys; - void* user; - } a; - ULONG size; - } pmap,dmap; - ULONG plen,dlen; -#define XFREE86_PMAP 0x76 -#define PMAP_MAP 0x44 - - pmap.a.phys = base; - pmap.size = size; - rc = DosDevIOCtl(hfd, XFREE86_PMAP, PMAP_MAP, - (PULONG)&pmap, sizeof(pmap), &plen, - (PULONG)&dmap, sizeof(dmap), &dlen); - if (rc == 0) { - pMap->virtual = dmap.a.user; - } - } - if (rc != 0) - return False; -#elif defined (Lynx) - pMap->virtual = smem_create("XF86DGA", (char*)base, size, SM_READ|SM_WRITE); -#else -#ifndef MAP_FILE -#define MAP_FILE 0 -#endif - if (!name) - name = DEV_MEM; - if ((pMap->fd = open(name, O_RDWR)) < 0) -#if defined(ENABLE_FBCON) - { /* /dev/fb0 fallback added by Sam Lantinga */ - /* Try to fall back to /dev/fb on Linux - FIXME: verify the device */ - struct fb_fix_screeninfo finfo; - - if ((pMap->fd = open("/dev/fb0", O_RDWR)) < 0) { - return False; - } - /* The useable framebuffer console memory may not be the whole - framebuffer that X has access to. :-( - */ - if ( ioctl(pMap->fd, FBIOGET_FSCREENINFO, &finfo) < 0 ) { - close(pMap->fd); - return False; - } - /* Warning: On PPC, the size and virtual need to be offset by: - (((long)finfo.smem_start) - - (((long)finfo.smem_start)&~(PAGE_SIZE-1))) - */ - base = 0; - size = pMap->size = finfo.smem_len; - } -#else - return False; -#endif - pMap->virtual = mmap(NULL, size, PROT_READ | PROT_WRITE, - MAP_FILE | MAP_SHARED, pMap->fd, (off_t)((size_t)base)); - if (pMap->virtual == (void *)-1) - return False; -#endif - -#if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \ - && !defined(__EMX__) - mprotect(pMap->virtual, size, PROT_READ | PROT_WRITE); -#endif - - return True; -} - - - -static void -DGAUnmapPhysical(DGAMapPtr pMap) -{ -#if !defined(ISC) && !defined(HAS_SVR3_MMAP) && !defined(Lynx) \ - && !defined(__EMX__) - mprotect(pMap->virtual,pMap->size, PROT_READ); -#elif defined(Lynx) - /* XXX this doesn't allow enable after disable */ - smem_create(NULL, pMap->virtual, pMap->size, SM_DETACH); - smem_remove("XF86DGA"); -#endif - - - /* We need to unmap and close too !!!!!!!!!!*/ -} diff --git a/apps/plugins/sdl/src/video/Xext/Xxf86vm/XF86VMode.c b/apps/plugins/sdl/src/video/Xext/Xxf86vm/XF86VMode.c deleted file mode 100644 index 5cb21905af..0000000000 --- a/apps/plugins/sdl/src/video/Xext/Xxf86vm/XF86VMode.c +++ /dev/null @@ -1,1226 +0,0 @@ -/* $XConsortium: XF86VMode.c /main/2 1995/11/14 18:17:58 kaleb $ */ -/* $XFree86: xc/lib/Xxf86vm/XF86VMode.c,v 3.32 2001/07/25 15:04:54 dawes Exp $ */ -/* - -Copyright (c) 1995 Kaleb S. KEITHLEY - -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 Kaleb S. KEITHLEY 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 Kaleb S. KEITHLEY -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -from Kaleb S. KEITHLEY. - -*/ -/* $XConsortium: XF86VMode.c /main/4 1996/01/16 07:52:25 kaleb CHECKEDOUT $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD */ - -#define NEED_EVENTS -#define NEED_REPLIES - -#ifndef XBUILD_IN_CLIENT -/* Apparently some X11 systems can't include this multiple times... */ -#ifndef SDL_INCLUDED_XLIBINT_H -#define SDL_INCLUDED_XLIBINT_H 1 -#include -#endif -#include "../extensions/xf86vmstr.h" -#include "../extensions/Xext.h" -#include "../extensions/extutil.h" -#else -#include "include/extensions/xf86vmstr.h" -#include "include/extensions/Xext.h" -#include "include/extensions/extutil.h" -#endif - -#ifdef DEBUG -#include -#endif - -#ifndef MODE_BAD -#define MODE_BAD 255 -#endif - -static XExtensionInfo _xf86vidmode_info_data; -static XExtensionInfo *xf86vidmode_info = &_xf86vidmode_info_data; -static char *xf86vidmode_extension_name = XF86VIDMODENAME; - -#define XF86VidModeCheckExtension(dpy,i,val) \ - XextCheckExtension (dpy, i, xf86vidmode_extension_name, val) - -/***************************************************************************** - * * - * private utility routines * - * * - *****************************************************************************/ - -static XEXT_CLOSE_DISPLAY_PROTO(close_display); -static /* const */ XExtensionHooks xf86vidmode_extension_hooks = { - NULL, /* create_gc */ - NULL, /* copy_gc */ - NULL, /* flush_gc */ - NULL, /* free_gc */ - NULL, /* create_font */ - NULL, /* free_font */ - close_display, /* close_display */ - NULL, /* wire_to_event */ - NULL, /* event_to_wire */ - NULL, /* error */ - NULL, /* error_string */ -}; - -static XEXT_GENERATE_FIND_DISPLAY (find_display, xf86vidmode_info, - xf86vidmode_extension_name, - &xf86vidmode_extension_hooks, - 0, NULL) - -static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xf86vidmode_info) - - -/***************************************************************************** - * * - * public XFree86-VidMode Extension routines * - * * - *****************************************************************************/ - -Bool -SDL_NAME(XF86VidModeQueryExtension) (dpy, event_basep, error_basep) - Display *dpy; - int *event_basep, *error_basep; -{ - XExtDisplayInfo *info = find_display (dpy); - - if (XextHasExtension(info)) { - *event_basep = info->codes->first_event; - *error_basep = info->codes->first_error; - return True; - } else { - return False; - } -} - -Bool -SDL_NAME(XF86VidModeQueryVersion)(dpy, majorVersion, minorVersion) - Display* dpy; - int* majorVersion; - int* minorVersion; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeQueryVersionReply rep; - xXF86VidModeQueryVersionReq *req; - - XF86VidModeCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeQueryVersion, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeQueryVersion; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *majorVersion = rep.majorVersion; - *minorVersion = rep.minorVersion; - UnlockDisplay(dpy); - SyncHandle(); - if (*majorVersion >= 2) - SDL_NAME(XF86VidModeSetClientVersion)(dpy); - return True; -} - -Bool -SDL_NAME(XF86VidModeSetClientVersion)(Display *dpy) -{ - XExtDisplayInfo *info = find_display(dpy); - xXF86VidModeSetClientVersionReq *req; - - XF86VidModeCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeSetClientVersion, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeSetClientVersion; - req->major = XF86VIDMODE_MAJOR_VERSION; - req->minor = XF86VIDMODE_MINOR_VERSION; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeSetGamma)(Display *dpy, int screen, SDL_NAME(XF86VidModeGamma) *Gamma) -{ - XExtDisplayInfo *info = find_display(dpy); - xXF86VidModeSetGammaReq *req; - - XF86VidModeCheckExtension(dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeSetGamma, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeSetGamma; - req->screen = screen; - req->red = (CARD32)(Gamma->red * 10000.); - req->green = (CARD32)(Gamma->green * 10000.); - req->blue = (CARD32)(Gamma->blue * 10000.); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeGetGamma)(Display *dpy, int screen, SDL_NAME(XF86VidModeGamma) *Gamma) -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeGetGammaReply rep; - xXF86VidModeGetGammaReq *req; - - XF86VidModeCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeGetGamma, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeGetGamma; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - Gamma->red = ((float)rep.red) / 10000.; - Gamma->green = ((float)rep.green) / 10000.; - Gamma->blue = ((float)rep.blue) / 10000.; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeGetModeLine)(dpy, screen, dotclock, modeline) - Display* dpy; - int screen; - int* dotclock; - SDL_NAME(XF86VidModeModeLine)* modeline; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeGetModeLineReply rep; - xXF86OldVidModeGetModeLineReply oldrep; - xXF86VidModeGetModeLineReq *req; - int majorVersion, minorVersion; - - XF86VidModeCheckExtension (dpy, info, False); - SDL_NAME(XF86VidModeQueryVersion)(dpy, &majorVersion, &minorVersion); - - LockDisplay(dpy); - GetReq(XF86VidModeGetModeLine, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeGetModeLine; - req->screen = screen; - - if (majorVersion < 2) { - if (!_XReply(dpy, (xReply *)&oldrep, - (SIZEOF(xXF86OldVidModeGetModeLineReply) - SIZEOF(xReply)) >> 2, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *dotclock = oldrep.dotclock; - modeline->hdisplay = oldrep.hdisplay; - modeline->hsyncstart = oldrep.hsyncstart; - modeline->hsyncend = oldrep.hsyncend; - modeline->htotal = oldrep.htotal; - modeline->hskew = 0; - modeline->vdisplay = oldrep.vdisplay; - modeline->vsyncstart = oldrep.vsyncstart; - modeline->vsyncend = oldrep.vsyncend; - modeline->vtotal = oldrep.vtotal; - modeline->flags = oldrep.flags; - modeline->privsize = oldrep.privsize; - } else { - if (!_XReply(dpy, (xReply *)&rep, - (SIZEOF(xXF86VidModeGetModeLineReply) - SIZEOF(xReply)) >> 2, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *dotclock = rep.dotclock; - modeline->hdisplay = rep.hdisplay; - modeline->hsyncstart = rep.hsyncstart; - modeline->hsyncend = rep.hsyncend; - modeline->htotal = rep.htotal; - modeline->hskew = rep.hskew; - modeline->vdisplay = rep.vdisplay; - modeline->vsyncstart = rep.vsyncstart; - modeline->vsyncend = rep.vsyncend; - modeline->vtotal = rep.vtotal; - modeline->flags = rep.flags; - modeline->privsize = rep.privsize; - } - - if (modeline->privsize > 0) { - if (!(modeline->private = Xcalloc(modeline->privsize, sizeof(INT32)))) { - _XEatData(dpy, (modeline->privsize) * sizeof(INT32)); - Xfree(modeline->private); - return False; - } - _XRead(dpy, (char*)modeline->private, modeline->privsize * sizeof(INT32)); - } else { - modeline->private = NULL; - } - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeGetAllModeLines)(dpy, screen, modecount, modelinesPtr) - Display* dpy; - int screen; - int* modecount; - SDL_NAME(XF86VidModeModeInfo) ***modelinesPtr; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeGetAllModeLinesReply rep; - xXF86VidModeGetAllModeLinesReq *req; - SDL_NAME(XF86VidModeModeInfo) *mdinfptr, **modelines; - xXF86VidModeModeInfo xmdline; - xXF86OldVidModeModeInfo oldxmdline; - int i; - int majorVersion, minorVersion; - Bool protocolBug = False; - - XF86VidModeCheckExtension (dpy, info, False); - - /* - * Note: There was a bug in the protocol implementation in versions - * 0.x with x < 8 (the .private field wasn't being passed over the wire). - * Check the server's version, and accept the old format if appropriate. - */ - - SDL_NAME(XF86VidModeQueryVersion)(dpy, &majorVersion, &minorVersion); - if (majorVersion == 0 && minorVersion < 8) { - protocolBug = True; -#ifdef DEBUG - fprintf(stderr, "XF86VidModeGetAllModeLines: Warning: Xserver is" - "running an old version (%d.%d)\n", majorVersion, - minorVersion); -#endif - } - - LockDisplay(dpy); - GetReq(XF86VidModeGetAllModeLines, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeGetAllModeLines; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, - (SIZEOF(xXF86VidModeGetAllModeLinesReply) - SIZEOF(xReply)) >> 2, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - *modecount = rep.modecount; - - if (!(modelines = (SDL_NAME(XF86VidModeModeInfo) **) Xcalloc(rep.modecount, - sizeof(SDL_NAME(XF86VidModeModeInfo) *) - +sizeof(SDL_NAME(XF86VidModeModeInfo))))) { - if (majorVersion < 2) - _XEatData(dpy, (rep.modecount) * sizeof(xXF86OldVidModeModeInfo)); - else - _XEatData(dpy, (rep.modecount) * sizeof(xXF86VidModeModeInfo)); - Xfree(modelines); - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - mdinfptr = (SDL_NAME(XF86VidModeModeInfo) *) ( - (char *) modelines - + rep.modecount*sizeof(SDL_NAME(XF86VidModeModeInfo) *) - ); - - for (i = 0; i < rep.modecount; i++) { - modelines[i] = mdinfptr++; - if (majorVersion < 2) { - _XRead(dpy, (char*)&oldxmdline, sizeof(xXF86OldVidModeModeInfo)); - modelines[i]->dotclock = oldxmdline.dotclock; - modelines[i]->hdisplay = oldxmdline.hdisplay; - modelines[i]->hsyncstart = oldxmdline.hsyncstart; - modelines[i]->hsyncend = oldxmdline.hsyncend; - modelines[i]->htotal = oldxmdline.htotal; - modelines[i]->hskew = 0; - modelines[i]->vdisplay = oldxmdline.vdisplay; - modelines[i]->vsyncstart = oldxmdline.vsyncstart; - modelines[i]->vsyncend = oldxmdline.vsyncend; - modelines[i]->vtotal = oldxmdline.vtotal; - modelines[i]->flags = oldxmdline.flags; - if (protocolBug) { - modelines[i]->privsize = 0; - modelines[i]->private = NULL; - } else { - modelines[i]->privsize = oldxmdline.privsize; - if (oldxmdline.privsize > 0) { - if (!(modelines[i]->private = - Xcalloc(oldxmdline.privsize, sizeof(INT32)))) { - _XEatData(dpy, (oldxmdline.privsize) * sizeof(INT32)); - Xfree(modelines[i]->private); - } else { - _XRead(dpy, (char*)modelines[i]->private, - oldxmdline.privsize * sizeof(INT32)); - } - } else { - modelines[i]->private = NULL; - } - } - } else { - _XRead(dpy, (char*)&xmdline, sizeof(xXF86VidModeModeInfo)); - modelines[i]->dotclock = xmdline.dotclock; - modelines[i]->hdisplay = xmdline.hdisplay; - modelines[i]->hsyncstart = xmdline.hsyncstart; - modelines[i]->hsyncend = xmdline.hsyncend; - modelines[i]->htotal = xmdline.htotal; - modelines[i]->hskew = xmdline.hskew; - modelines[i]->vdisplay = xmdline.vdisplay; - modelines[i]->vsyncstart = xmdline.vsyncstart; - modelines[i]->vsyncend = xmdline.vsyncend; - modelines[i]->vtotal = xmdline.vtotal; - modelines[i]->flags = xmdline.flags; - if (protocolBug) { - modelines[i]->privsize = 0; - modelines[i]->private = NULL; - } else { - modelines[i]->privsize = xmdline.privsize; - if (xmdline.privsize > 0) { - if (!(modelines[i]->private = - Xcalloc(xmdline.privsize, sizeof(INT32)))) { - _XEatData(dpy, (xmdline.privsize) * sizeof(INT32)); - Xfree(modelines[i]->private); - } else { - _XRead(dpy, (char*)modelines[i]->private, - xmdline.privsize * sizeof(INT32)); - } - } else { - modelines[i]->private = NULL; - } - } - } - } - *modelinesPtr = modelines; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -/* - * GetReq replacement for use with VidMode protocols earlier than 2.0 - */ -#if !defined(UNIXCPP) || defined(ANSICPP) -#define GetOldReq(name, oldname, req) \ - WORD64ALIGN\ - if ((dpy->bufptr + SIZEOF(x##oldname##Req)) > dpy->bufmax)\ - _XFlush(dpy);\ - req = (x##oldname##Req *)(dpy->last_req = dpy->bufptr);\ - req->reqType = X_##name;\ - req->length = (SIZEOF(x##oldname##Req))>>2;\ - dpy->bufptr += SIZEOF(x##oldname##Req);\ - dpy->request++ - -#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */ -#define GetOldReq(name, oldname, req) \ - WORD64ALIGN\ - if ((dpy->bufptr + SIZEOF(x/**/oldname/**/Req)) > dpy->bufmax)\ - _XFlush(dpy);\ - req = (x/**/oldname/**/Req *)(dpy->last_req = dpy->bufptr);\ - req->reqType = X_/**/name;\ - req->length = (SIZEOF(x/**/oldname/**/Req))>>2;\ - dpy->bufptr += SIZEOF(x/**/oldname/**/Req);\ - dpy->request++ -#endif - -Bool -SDL_NAME(XF86VidModeAddModeLine) (dpy, screen, newmodeline, aftermodeline) - Display *dpy; - int screen; - SDL_NAME(XF86VidModeModeInfo)* newmodeline; - SDL_NAME(XF86VidModeModeInfo)* aftermodeline; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeAddModeLineReq *req; - xXF86OldVidModeAddModeLineReq *oldreq; - int majorVersion, minorVersion; - - XF86VidModeCheckExtension (dpy, info, False); - SDL_NAME(XF86VidModeQueryVersion)(dpy, &majorVersion, &minorVersion); - - LockDisplay(dpy); - if (majorVersion < 2) { - GetOldReq(XF86VidModeAddModeLine, XF86OldVidModeAddModeLine, oldreq); - oldreq->reqType = info->codes->major_opcode; - oldreq->xf86vidmodeReqType = X_XF86VidModeAddModeLine; - oldreq->screen = screen; - oldreq->dotclock = newmodeline->dotclock; - oldreq->hdisplay = newmodeline->hdisplay; - oldreq->hsyncstart = newmodeline->hsyncstart; - oldreq->hsyncend = newmodeline->hsyncend; - oldreq->htotal = newmodeline->htotal; - oldreq->vdisplay = newmodeline->vdisplay; - oldreq->vsyncstart = newmodeline->vsyncstart; - oldreq->vsyncend = newmodeline->vsyncend; - oldreq->vtotal = newmodeline->vtotal; - oldreq->flags = newmodeline->flags; - oldreq->privsize = newmodeline->privsize; - if (aftermodeline != NULL) { - oldreq->after_dotclock = aftermodeline->dotclock; - oldreq->after_hdisplay = aftermodeline->hdisplay; - oldreq->after_hsyncstart = aftermodeline->hsyncstart; - oldreq->after_hsyncend = aftermodeline->hsyncend; - oldreq->after_htotal = aftermodeline->htotal; - oldreq->after_vdisplay = aftermodeline->vdisplay; - oldreq->after_vsyncstart = aftermodeline->vsyncstart; - oldreq->after_vsyncend = aftermodeline->vsyncend; - oldreq->after_vtotal = aftermodeline->vtotal; - oldreq->after_flags = aftermodeline->flags; - } else { - oldreq->after_dotclock = 0; - oldreq->after_hdisplay = 0; - oldreq->after_hsyncstart = 0; - oldreq->after_hsyncend = 0; - oldreq->after_htotal = 0; - oldreq->after_vdisplay = 0; - oldreq->after_vsyncstart = 0; - oldreq->after_vsyncend = 0; - oldreq->after_vtotal = 0; - oldreq->after_flags = 0; - } - if (newmodeline->privsize) { - oldreq->length += newmodeline->privsize; - Data32(dpy, (long *) newmodeline->private, - newmodeline->privsize * sizeof(INT32)); - } - } else { - GetReq(XF86VidModeAddModeLine, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeAddModeLine; - req->screen = screen; - req->dotclock = newmodeline->dotclock; - req->hdisplay = newmodeline->hdisplay; - req->hsyncstart = newmodeline->hsyncstart; - req->hsyncend = newmodeline->hsyncend; - req->htotal = newmodeline->htotal; - req->hskew = newmodeline->hskew; - req->vdisplay = newmodeline->vdisplay; - req->vsyncstart = newmodeline->vsyncstart; - req->vsyncend = newmodeline->vsyncend; - req->vtotal = newmodeline->vtotal; - req->flags = newmodeline->flags; - req->privsize = newmodeline->privsize; - if (aftermodeline != NULL) { - req->after_dotclock = aftermodeline->dotclock; - req->after_hdisplay = aftermodeline->hdisplay; - req->after_hsyncstart = aftermodeline->hsyncstart; - req->after_hsyncend = aftermodeline->hsyncend; - req->after_htotal = aftermodeline->htotal; - req->after_hskew = aftermodeline->hskew; - req->after_vdisplay = aftermodeline->vdisplay; - req->after_vsyncstart = aftermodeline->vsyncstart; - req->after_vsyncend = aftermodeline->vsyncend; - req->after_vtotal = aftermodeline->vtotal; - req->after_flags = aftermodeline->flags; - } else { - req->after_dotclock = 0; - req->after_hdisplay = 0; - req->after_hsyncstart = 0; - req->after_hsyncend = 0; - req->after_htotal = 0; - req->after_hskew = 0; - req->after_vdisplay = 0; - req->after_vsyncstart = 0; - req->after_vsyncend = 0; - req->after_vtotal = 0; - req->after_flags = 0; - } - if (newmodeline->privsize) { - req->length += newmodeline->privsize; - Data32(dpy, (long *) newmodeline->private, - newmodeline->privsize * sizeof(INT32)); - } - } - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeDeleteModeLine) (dpy, screen, modeline) - Display *dpy; - int screen; - SDL_NAME(XF86VidModeModeInfo)* modeline; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeDeleteModeLineReq *req; - xXF86OldVidModeDeleteModeLineReq *oldreq; - int majorVersion, minorVersion; - - XF86VidModeCheckExtension (dpy, info, 0); - SDL_NAME(XF86VidModeQueryVersion)(dpy, &majorVersion, &minorVersion); - - LockDisplay(dpy); - if (majorVersion < 2) { - GetOldReq(XF86VidModeDeleteModeLine, XF86OldVidModeDeleteModeLine, oldreq); - oldreq->reqType = info->codes->major_opcode; - oldreq->xf86vidmodeReqType = X_XF86VidModeDeleteModeLine; - oldreq->screen = screen; - oldreq->dotclock = modeline->dotclock; - oldreq->hdisplay = modeline->hdisplay; - oldreq->hsyncstart = modeline->hsyncstart; - oldreq->hsyncend = modeline->hsyncend; - oldreq->htotal = modeline->htotal; - oldreq->vdisplay = modeline->vdisplay; - oldreq->vsyncstart = modeline->vsyncstart; - oldreq->vsyncend = modeline->vsyncend; - oldreq->vtotal = modeline->vtotal; - oldreq->flags = modeline->flags; - oldreq->privsize = modeline->privsize; - if (modeline->privsize) { - oldreq->length += modeline->privsize; - Data32(dpy, (long *) modeline->private, - modeline->privsize * sizeof(INT32)); - } - } else { - GetReq(XF86VidModeDeleteModeLine, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeDeleteModeLine; - req->screen = screen; - req->dotclock = modeline->dotclock; - req->hdisplay = modeline->hdisplay; - req->hsyncstart = modeline->hsyncstart; - req->hsyncend = modeline->hsyncend; - req->htotal = modeline->htotal; - req->hskew = modeline->hskew; - req->vdisplay = modeline->vdisplay; - req->vsyncstart = modeline->vsyncstart; - req->vsyncend = modeline->vsyncend; - req->vtotal = modeline->vtotal; - req->flags = modeline->flags; - req->privsize = modeline->privsize; - if (modeline->privsize) { - req->length += modeline->privsize; - Data32(dpy, (long *) modeline->private, - modeline->privsize * sizeof(INT32)); - } - } - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeModModeLine) (dpy, screen, modeline) - Display *dpy; - int screen; - SDL_NAME(XF86VidModeModeLine)* modeline; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeModModeLineReq *req; - xXF86OldVidModeModModeLineReq *oldreq; - int majorVersion, minorVersion; - - XF86VidModeCheckExtension (dpy, info, 0); - SDL_NAME(XF86VidModeQueryVersion)(dpy, &majorVersion, &minorVersion); - - LockDisplay(dpy); - if (majorVersion < 2) { - GetOldReq(XF86VidModeModModeLine, XF86OldVidModeModModeLine, oldreq); - oldreq->reqType = info->codes->major_opcode; - oldreq->xf86vidmodeReqType = X_XF86VidModeModModeLine; - oldreq->screen = screen; - oldreq->hdisplay = modeline->hdisplay; - oldreq->hsyncstart = modeline->hsyncstart; - oldreq->hsyncend = modeline->hsyncend; - oldreq->htotal = modeline->htotal; - oldreq->vdisplay = modeline->vdisplay; - oldreq->vsyncstart = modeline->vsyncstart; - oldreq->vsyncend = modeline->vsyncend; - oldreq->vtotal = modeline->vtotal; - oldreq->flags = modeline->flags; - oldreq->privsize = modeline->privsize; - if (modeline->privsize) { - oldreq->length += modeline->privsize; - Data32(dpy, (long *) modeline->private, - modeline->privsize * sizeof(INT32)); - } - } else { - GetReq(XF86VidModeModModeLine, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeModModeLine; - req->screen = screen; - req->hdisplay = modeline->hdisplay; - req->hsyncstart = modeline->hsyncstart; - req->hsyncend = modeline->hsyncend; - req->htotal = modeline->htotal; - req->hskew = modeline->hskew; - req->vdisplay = modeline->vdisplay; - req->vsyncstart = modeline->vsyncstart; - req->vsyncend = modeline->vsyncend; - req->vtotal = modeline->vtotal; - req->flags = modeline->flags; - req->privsize = modeline->privsize; - if (modeline->privsize) { - req->length += modeline->privsize; - Data32(dpy, (long *) modeline->private, - modeline->privsize * sizeof(INT32)); - } - } - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Status -SDL_NAME(XF86VidModeValidateModeLine) (dpy, screen, modeline) - Display *dpy; - int screen; - SDL_NAME(XF86VidModeModeInfo)* modeline; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeValidateModeLineReq *req; - xXF86OldVidModeValidateModeLineReq *oldreq; - xXF86VidModeValidateModeLineReply rep; - int majorVersion, minorVersion; - - XF86VidModeCheckExtension (dpy, info, 0); - SDL_NAME(XF86VidModeQueryVersion)(dpy, &majorVersion, &minorVersion); - - LockDisplay(dpy); - - if (majorVersion < 2) { - GetOldReq(XF86VidModeValidateModeLine, XF86OldVidModeValidateModeLine, oldreq); - oldreq->reqType = info->codes->major_opcode; - oldreq->xf86vidmodeReqType = X_XF86VidModeValidateModeLine; - oldreq->screen = screen; - oldreq->dotclock = modeline->dotclock; - oldreq->hdisplay = modeline->hdisplay; - oldreq->hsyncstart = modeline->hsyncstart; - oldreq->hsyncend = modeline->hsyncend; - oldreq->htotal = modeline->htotal; - oldreq->vdisplay = modeline->vdisplay; - oldreq->vsyncstart = modeline->vsyncstart; - oldreq->vsyncend = modeline->vsyncend; - oldreq->vtotal = modeline->vtotal; - oldreq->flags = modeline->flags; - oldreq->privsize = modeline->privsize; - if (modeline->privsize) { - oldreq->length += modeline->privsize; - Data32(dpy, (long *) modeline->private, - modeline->privsize * sizeof(INT32)); - } - } else { - GetReq(XF86VidModeValidateModeLine, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeValidateModeLine; - req->screen = screen; - req->dotclock = modeline->dotclock; - req->hdisplay = modeline->hdisplay; - req->hsyncstart = modeline->hsyncstart; - req->hsyncend = modeline->hsyncend; - req->htotal = modeline->htotal; - req->hskew = modeline->hskew; - req->vdisplay = modeline->vdisplay; - req->vsyncstart = modeline->vsyncstart; - req->vsyncend = modeline->vsyncend; - req->vtotal = modeline->vtotal; - req->flags = modeline->flags; - req->privsize = modeline->privsize; - if (modeline->privsize) { - req->length += modeline->privsize; - Data32(dpy, (long *) modeline->private, - modeline->privsize * sizeof(INT32)); - } - } - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return MODE_BAD; - } - UnlockDisplay(dpy); - SyncHandle(); - return rep.status; -} - -Bool -SDL_NAME(XF86VidModeSwitchMode)(dpy, screen, zoom) - Display* dpy; - int screen; - int zoom; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeSwitchModeReq *req; - - XF86VidModeCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeSwitchMode, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeSwitchMode; - req->screen = screen; - req->zoom = zoom; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeSwitchToMode)(dpy, screen, modeline) - Display* dpy; - int screen; - SDL_NAME(XF86VidModeModeInfo)* modeline; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeSwitchToModeReq *req; - xXF86OldVidModeSwitchToModeReq *oldreq; - int majorVersion, minorVersion; - Bool protocolBug = False; - - XF86VidModeCheckExtension (dpy, info, False); - - /* - * Note: There was a bug in the protocol implementation in versions - * 0.x with x < 8 (the .private field wasn't expected to be sent over - * the wire). Check the server's version, and accept the old format - * if appropriate. - */ - - SDL_NAME(XF86VidModeQueryVersion)(dpy, &majorVersion, &minorVersion); - if (majorVersion == 0 && minorVersion < 8) { - protocolBug = True; -#ifdef DEBUG - fprintf(stderr, "XF86VidModeSwitchToMode: Warning: Xserver is" - "running an old version (%d.%d)\n", majorVersion, - minorVersion); -#endif - } - - LockDisplay(dpy); - if (majorVersion < 2) { - GetOldReq(XF86VidModeSwitchToMode, XF86OldVidModeSwitchToMode, oldreq); - oldreq->reqType = info->codes->major_opcode; - oldreq->xf86vidmodeReqType = X_XF86VidModeSwitchToMode; - oldreq->screen = screen; - oldreq->dotclock = modeline->dotclock; - oldreq->hdisplay = modeline->hdisplay; - oldreq->hsyncstart = modeline->hsyncstart; - oldreq->hsyncend = modeline->hsyncend; - oldreq->htotal = modeline->htotal; - oldreq->vdisplay = modeline->vdisplay; - oldreq->vsyncstart = modeline->vsyncstart; - oldreq->vsyncend = modeline->vsyncend; - oldreq->vtotal = modeline->vtotal; - oldreq->flags = modeline->flags; - if (protocolBug) { - oldreq->privsize = 0; - } else { - oldreq->privsize = modeline->privsize; - if (modeline->privsize) { - oldreq->length += modeline->privsize; - Data32(dpy, (long *) modeline->private, - modeline->privsize * sizeof(INT32)); - } - } - } else { - GetReq(XF86VidModeSwitchToMode, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeSwitchToMode; - req->screen = screen; - req->dotclock = modeline->dotclock; - req->hdisplay = modeline->hdisplay; - req->hsyncstart = modeline->hsyncstart; - req->hsyncend = modeline->hsyncend; - req->htotal = modeline->htotal; - req->hskew = modeline->hskew; - req->vdisplay = modeline->vdisplay; - req->vsyncstart = modeline->vsyncstart; - req->vsyncend = modeline->vsyncend; - req->vtotal = modeline->vtotal; - req->flags = modeline->flags; - if (protocolBug) { - req->privsize = 0; - } else { - req->privsize = modeline->privsize; - if (modeline->privsize) { - req->length += modeline->privsize; - Data32(dpy, (long *) modeline->private, - modeline->privsize * sizeof(INT32)); - } - } - } - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeLockModeSwitch)(dpy, screen, lock) - Display* dpy; - int screen; - int lock; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeLockModeSwitchReq *req; - - XF86VidModeCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeLockModeSwitch, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeLockModeSwitch; - req->screen = screen; - req->lock = lock; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeGetMonitor)(dpy, screen, monitor) - Display* dpy; - int screen; - SDL_NAME(XF86VidModeMonitor)* monitor; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeGetMonitorReply rep; - xXF86VidModeGetMonitorReq *req; - CARD32 syncrange; - int i; - - XF86VidModeCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeGetMonitor, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeGetMonitor; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - monitor->nhsync = rep.nhsync; - monitor->nvsync = rep.nvsync; -#if 0 - monitor->bandwidth = (float)rep.bandwidth / 1e6; -#endif - if (rep.vendorLength) { - if (!(monitor->vendor = (char *)Xcalloc(rep.vendorLength + 1, 1))) { - _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 + - ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3)); - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - } else { - monitor->vendor = NULL; - } - if (rep.modelLength) { - if (!(monitor->model = Xcalloc(rep.modelLength + 1, 1))) { - _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 + - ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3)); - if (monitor->vendor) - Xfree(monitor->vendor); - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - } else { - monitor->model = NULL; - } - if (!(monitor->hsync = Xcalloc(rep.nhsync, sizeof(SDL_NAME(XF86VidModeSyncRange))))) { - _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 + - ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3)); - - if (monitor->vendor) - Xfree(monitor->vendor); - if (monitor->model) - Xfree(monitor->model); - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - if (!(monitor->vsync = Xcalloc(rep.nvsync, sizeof(SDL_NAME(XF86VidModeSyncRange))))) { - _XEatData(dpy, (rep.nhsync + rep.nvsync) * 4 + - ((rep.vendorLength+3) & ~3) + ((rep.modelLength+3) & ~3)); - if (monitor->vendor) - Xfree(monitor->vendor); - if (monitor->model) - Xfree(monitor->model); - Xfree(monitor->hsync); - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - for (i = 0; i < rep.nhsync; i++) { - _XRead(dpy, (char *)&syncrange, 4); - monitor->hsync[i].lo = (float)(syncrange & 0xFFFF) / 100.0; - monitor->hsync[i].hi = (float)(syncrange >> 16) / 100.0; - } - for (i = 0; i < rep.nvsync; i++) { - _XRead(dpy, (char *)&syncrange, 4); - monitor->vsync[i].lo = (float)(syncrange & 0xFFFF) / 100.0; - monitor->vsync[i].hi = (float)(syncrange >> 16) / 100.0; - } - if (rep.vendorLength) - _XReadPad(dpy, monitor->vendor, rep.vendorLength); - else - monitor->vendor = ""; - if (rep.modelLength) - _XReadPad(dpy, monitor->model, rep.modelLength); - else - monitor->model = ""; - - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeGetViewPort)(dpy, screen, x, y) - Display* dpy; - int screen; - int *x, *y; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeGetViewPortReply rep; - xXF86VidModeGetViewPortReq *req; - int majorVersion, minorVersion; - Bool protocolBug = False; - - XF86VidModeCheckExtension (dpy, info, False); - - /* - * Note: There was a bug in the protocol implementation in versions - * 0.x with x < 8 (no reply was sent, so the client would hang) - * Check the server's version, and don't wait for a reply with older - * versions. - */ - - SDL_NAME(XF86VidModeQueryVersion)(dpy, &majorVersion, &minorVersion); - if (majorVersion == 0 && minorVersion < 8) { - protocolBug = True; -#ifdef DEBUG - fprintf(stderr, "XF86VidModeGetViewPort: Warning: Xserver is" - "running an old version (%d.%d)\n", majorVersion, - minorVersion); -#endif - } - LockDisplay(dpy); - GetReq(XF86VidModeGetViewPort, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeGetViewPort; - req->screen = screen; - if (protocolBug) { - *x = 0; - *y = 0; - } else { - if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *x = rep.x; - *y = rep.y; - } - - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeSetViewPort)(dpy, screen, x, y) - Display* dpy; - int screen; - int x, y; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeSetViewPortReq *req; - - XF86VidModeCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeSetViewPort, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeSetViewPort; - req->screen = screen; - req->x = x; - req->y = y; - - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeGetDotClocks)(dpy, screen, - flagsPtr, numclocksPtr, maxclocksPtr, clocksPtr) - Display* dpy; - int screen; - int *flagsPtr, *numclocksPtr, *maxclocksPtr, *clocksPtr[]; -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeGetDotClocksReply rep; - xXF86VidModeGetDotClocksReq *req; - int i, *dotclocks; - CARD32 dotclk; - - XF86VidModeCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeGetDotClocks, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeGetDotClocks; - req->screen = screen; - if (!_XReply(dpy, (xReply *)&rep, - (SIZEOF(xXF86VidModeGetDotClocksReply) - SIZEOF(xReply)) >> 2, xFalse)) - { - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - *numclocksPtr = rep.clocks; - *maxclocksPtr = rep.maxclocks; - *flagsPtr = rep.flags; - - if (!(dotclocks = (int*) Xcalloc(rep.clocks, sizeof(int)))) { - _XEatData(dpy, (rep.clocks) * 4); - Xfree(dotclocks); - UnlockDisplay(dpy); - SyncHandle(); - return False; - } - - for (i = 0; i < rep.clocks; i++) { - _XRead(dpy, (char*)&dotclk, 4); - dotclocks[i] = dotclk; - } - *clocksPtr = dotclocks; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool -SDL_NAME(XF86VidModeSetGammaRamp) ( - Display *dpy, - int screen, - int size, - unsigned short *red, - unsigned short *green, - unsigned short *blue -) -{ - int length = (size + 1) & ~1; - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeSetGammaRampReq *req; - - XF86VidModeCheckExtension (dpy, info, False); - LockDisplay(dpy); - GetReq(XF86VidModeSetGammaRamp, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeSetGammaRamp; - req->screen = screen; - req->length += (length >> 1) * 3; - req->size = size; - _XSend(dpy, (char*)red, size * 2); - _XSend(dpy, (char*)green, size * 2); - _XSend(dpy, (char*)blue, size * 2); - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - - -Bool -SDL_NAME(XF86VidModeGetGammaRamp) ( - Display *dpy, - int screen, - int size, - unsigned short *red, - unsigned short *green, - unsigned short *blue -) -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeGetGammaRampReq *req; - xXF86VidModeGetGammaRampReply rep; - - XF86VidModeCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeGetGammaRamp, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeGetGammaRamp; - req->screen = screen; - req->size = size; - if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - if(rep.size) { - _XRead(dpy, (char*)red, rep.size << 1); - _XRead(dpy, (char*)green, rep.size << 1); - _XRead(dpy, (char*)blue, rep.size << 1); - } - - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - -Bool SDL_NAME(XF86VidModeGetGammaRampSize)( - Display *dpy, - int screen, - int *size -) -{ - XExtDisplayInfo *info = find_display (dpy); - xXF86VidModeGetGammaRampSizeReq *req; - xXF86VidModeGetGammaRampSizeReply rep; - - *size = 0; - - XF86VidModeCheckExtension (dpy, info, False); - - LockDisplay(dpy); - GetReq(XF86VidModeGetGammaRampSize, req); - req->reqType = info->codes->major_opcode; - req->xf86vidmodeReqType = X_XF86VidModeGetGammaRampSize; - req->screen = screen; - if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { - UnlockDisplay (dpy); - SyncHandle (); - return False; - } - *size = rep.size; - UnlockDisplay(dpy); - SyncHandle(); - return True; -} - diff --git a/apps/plugins/sdl/src/video/Xext/extensions/Xext.h b/apps/plugins/sdl/src/video/Xext/extensions/Xext.h deleted file mode 100644 index 9edf3194b4..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/Xext.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -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. - */ -/* $XFree86: xc/include/extensions/Xext.h,v 1.7 2005/01/27 03:03:09 dawes Exp $ */ - -#ifndef _XEXT_H_ -#define _XEXT_H_ - -#include - -_XFUNCPROTOBEGIN - -typedef int (*XExtensionErrorHandler)(Display *, _Xconst char *, - _Xconst char *); - -extern XExtensionErrorHandler XSetExtensionErrorHandler( - XExtensionErrorHandler handler -); - -extern int XMissingExtension( - Display* /* dpy */, - _Xconst char* /* ext_name */ -); - -_XFUNCPROTOEND - -#define X_EXTENSION_UNKNOWN "unknown" -#define X_EXTENSION_MISSING "missing" - -#endif /* _XEXT_H_ */ diff --git a/apps/plugins/sdl/src/video/Xext/extensions/Xinerama.h b/apps/plugins/sdl/src/video/Xext/extensions/Xinerama.h deleted file mode 100644 index 54f2fe17d2..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/Xinerama.h +++ /dev/null @@ -1,46 +0,0 @@ -/* $XFree86: xc/include/extensions/Xinerama.h,v 3.2 2000/03/01 01:04:20 dawes Exp $ */ - -#ifndef _Xinerama_h -#define _Xinerama_h - -#include "SDL_name.h" - -typedef struct { - int screen_number; - short x_org; - short y_org; - short width; - short height; -} SDL_NAME(XineramaScreenInfo); - -Bool SDL_NAME(XineramaQueryExtension) ( - Display *dpy, - int *event_base, - int *error_base -); - -Status SDL_NAME(XineramaQueryVersion)( - Display *dpy, - int *major, - int *minor -); - -Bool SDL_NAME(XineramaIsActive)(Display *dpy); - - -/* - Returns the number of heads and a pointer to an array of - structures describing the position and size of the individual - heads. Returns NULL and number = 0 if Xinerama is not active. - - Returned array should be freed with XFree(). -*/ - -SDL_NAME(XineramaScreenInfo) * -SDL_NAME(XineramaQueryScreens)( - Display *dpy, - int *number -); - -#endif /* _Xinerama_h */ - diff --git a/apps/plugins/sdl/src/video/Xext/extensions/Xv.h b/apps/plugins/sdl/src/video/Xext/extensions/Xv.h deleted file mode 100644 index a6a027195f..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/Xv.h +++ /dev/null @@ -1,129 +0,0 @@ -/*********************************************************** -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. - -******************************************************************/ -/* $XFree86: xc/include/extensions/Xv.h,v 1.5 1999/12/11 19:28:48 mvojkovi Exp $ */ - -#ifndef XV_H -#define XV_H -/* -** File: -** -** Xv.h --- Xv shared library and server header file -** -** Author: -** -** David Carver (Digital Workstation Engineering/Project Athena) -** -** Revisions: -** -** 05.15.91 Carver -** - version 2.0 upgrade -** -** 01.24.91 Carver -** - version 1.4 upgrade -** -*/ - -#include - -#define XvName "XVideo" -#define XvVersion 2 -#define XvRevision 2 - -/* Symbols */ - -typedef XID XvPortID; -typedef XID XvEncodingID; - -#define XvNone 0 - -#define XvInput 0 -#define XvOutput 1 - -#define XvInputMask (1L< -#include "Xv.h" -#include "SDL_name.h" - -typedef struct { - int numerator; - int denominator; -} SDL_NAME(XvRational); - -typedef struct { - int flags; /* XvGettable, XvSettable */ - int min_value; - int max_value; - char *name; -} SDL_NAME(XvAttribute); - -typedef struct { - XvEncodingID encoding_id; - char *name; - unsigned long width; - unsigned long height; - SDL_NAME(XvRational) rate; - unsigned long num_encodings; -} SDL_NAME(XvEncodingInfo); - -typedef struct { - char depth; - unsigned long visual_id; -} SDL_NAME(XvFormat); - -typedef struct { - XvPortID base_id; - unsigned long num_ports; - char type; - char *name; - unsigned long num_formats; - SDL_NAME(XvFormat) *formats; - unsigned long num_adaptors; -} SDL_NAME(XvAdaptorInfo); - -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - Drawable drawable; /* drawable */ - unsigned long reason; /* what generated this event */ - XvPortID port_id; /* what port */ - Time time; /* milliseconds */ -} SDL_NAME(XvVideoNotifyEvent); - -typedef struct { - int type; - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent request */ - Display *display; /* Display the event was read from */ - XvPortID port_id; /* what port */ - Time time; /* milliseconds */ - Atom attribute; /* atom that identifies attribute */ - long value; /* value of attribute */ -} SDL_NAME(XvPortNotifyEvent); - -typedef union { - int type; - SDL_NAME(XvVideoNotifyEvent) xvvideo; - SDL_NAME(XvPortNotifyEvent) xvport; - long pad[24]; -} SDL_NAME(XvEvent); - -typedef struct { - int id; /* Unique descriptor for the format */ - int type; /* XvRGB, XvYUV */ - int byte_order; /* LSBFirst, MSBFirst */ - char guid[16]; /* Globally Unique IDentifier */ - int bits_per_pixel; - int format; /* XvPacked, XvPlanar */ - 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]; /* eg. UYVY */ - int scanline_order; /* XvTopToBottom, XvBottomToTop */ -} SDL_NAME(XvImageFormatValues); - -typedef struct { - int id; - int width, height; - int data_size; /* bytes */ - int num_planes; - int *pitches; /* bytes */ - int *offsets; /* bytes */ - char *data; - XPointer obdata; -} SDL_NAME(XvImage); - -_XFUNCPROTOBEGIN - -extern int SDL_NAME(XvQueryExtension)( -#if NeedFunctionPrototypes - Display* /* display */, - unsigned int* /* p_version */, - unsigned int* /* p_revision */, - unsigned int* /* p_requestBase */, - unsigned int* /* p_eventBase */, - unsigned int* /* p_errorBase */ -#endif -); - -extern int SDL_NAME(XvQueryAdaptors)( -#if NeedFunctionPrototypes - Display* /* display */, - Window /* window */, - unsigned int* /* p_nAdaptors */, - SDL_NAME(XvAdaptorInfo)** /* p_pAdaptors */ -#endif -); - -extern int SDL_NAME(XvQueryEncodings)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - unsigned int* /* p_nEncoding */, - SDL_NAME(XvEncodingInfo)** /* p_pEncoding */ -#endif -); - -extern int SDL_NAME(XvPutVideo)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Drawable /* d */, - GC /* gc */, - int /* vx */, - int /* vy */, - unsigned int /* vw */, - unsigned int /* vh */, - int /* dx */, - int /* dy */, - unsigned int /* dw */, - unsigned int /* dh */ -#endif -); - -extern int SDL_NAME(XvPutStill)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Drawable /* d */, - GC /* gc */, - int /* vx */, - int /* vy */, - unsigned int /* vw */, - unsigned int /* vh */, - int /* dx */, - int /* dy */, - unsigned int /* dw */, - unsigned int /* dh */ -#endif -); - -extern int SDL_NAME(XvGetVideo)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Drawable /* d */, - GC /* gc */, - int /* vx */, - int /* vy */, - unsigned int /* vw */, - unsigned int /* vh */, - int /* dx */, - int /* dy */, - unsigned int /* dw */, - unsigned int /* dh */ -#endif -); - -extern int SDL_NAME(XvGetStill)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Drawable /* d */, - GC /* gc */, - int /* vx */, - int /* vy */, - unsigned int /* vw */, - unsigned int /* vh */, - int /* dx */, - int /* dy */, - unsigned int /* dw */, - unsigned int /* dh */ -#endif -); - -extern int SDL_NAME(XvStopVideo)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Drawable /* drawable */ -#endif -); - -extern int SDL_NAME(XvGrabPort)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Time /* time */ -#endif -); - -extern int SDL_NAME(XvUngrabPort)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Time /* time */ -#endif -); - -extern int SDL_NAME(XvSelectVideoNotify)( -#if NeedFunctionPrototypes - Display* /* display */, - Drawable /* drawable */, - Bool /* onoff */ -#endif -); - -extern int SDL_NAME(XvSelectPortNotify)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Bool /* onoff */ -#endif -); - -extern int SDL_NAME(XvSetPortAttribute)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Atom /* attribute */, - int /* value */ -#endif -); - -extern int SDL_NAME(XvGetPortAttribute)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Atom /* attribute */, - int* /* p_value */ -#endif -); - -extern int SDL_NAME(XvQueryBestSize)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - Bool /* motion */, - unsigned int /* vid_w */, - unsigned int /* vid_h */, - unsigned int /* drw_w */, - unsigned int /* drw_h */, - unsigned int* /* p_actual_width */, - unsigned int* /* p_actual_width */ -#endif -); - -extern SDL_NAME(XvAttribute)* SDL_NAME(XvQueryPortAttributes)( -#if NeedFunctionPrototypes - Display* /* display */, - XvPortID /* port */, - int* /* number */ -#endif -); - - -extern void SDL_NAME(XvFreeAdaptorInfo)( -#if NeedFunctionPrototypes - SDL_NAME(XvAdaptorInfo)* /* adaptors */ -#endif -); - -extern void SDL_NAME(XvFreeEncodingInfo)( -#if NeedFunctionPrototypes - SDL_NAME(XvEncodingInfo)* /* encodings */ -#endif -); - - -extern SDL_NAME(XvImageFormatValues) * SDL_NAME(XvListImageFormats) ( -#if NeedFunctionPrototypes - Display *display, - XvPortID port_id, - int *count_return -#endif -); - -extern SDL_NAME(XvImage) * SDL_NAME(XvCreateImage) ( -#if NeedFunctionPrototypes - Display *display, - XvPortID port, - int id, - char *data, - int width, - int height -#endif -); - -extern int SDL_NAME(XvPutImage) ( -#if NeedFunctionPrototypes - Display *display, - XvPortID id, - Drawable d, - GC gc, - SDL_NAME(XvImage) *image, - int src_x, - int src_y, - unsigned int src_w, - unsigned int src_h, - int dest_x, - int dest_y, - unsigned int dest_w, - unsigned int dest_h -#endif -); - -extern int SDL_NAME(XvShmPutImage) ( -#if NeedFunctionPrototypes - Display *display, - XvPortID id, - Drawable d, - GC gc, - SDL_NAME(XvImage) *image, - int src_x, - int src_y, - unsigned int src_w, - unsigned int src_h, - int dest_x, - int dest_y, - unsigned int dest_w, - unsigned int dest_h, - Bool send_event -#endif -); - -#ifdef _XSHM_H_ - -extern SDL_NAME(XvImage) * SDL_NAME(XvShmCreateImage) ( -#if NeedFunctionPrototypes - Display *display, - XvPortID port, - int id, - char* data, - int width, - int height, - XShmSegmentInfo *shminfo -#endif -); - -#endif - - -_XFUNCPROTOEND - -#endif /* XVLIB_H */ diff --git a/apps/plugins/sdl/src/video/Xext/extensions/Xvproto.h b/apps/plugins/sdl/src/video/Xext/extensions/Xvproto.h deleted file mode 100644 index b4d8f22cdc..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/Xvproto.h +++ /dev/null @@ -1,604 +0,0 @@ -/*********************************************************** -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. - -******************************************************************/ -/* $XFree86: xc/include/extensions/Xvproto.h,v 1.6 2001/05/07 21:37:12 tsi Exp $ */ - -#ifndef XVPROTO_H -#define XVPROTO_H -/* -** File: -** -** Xvproto.h --- Xv protocol header file -** -** Author: -** -** David Carver (Digital Workstation Engineering/Project Athena) -** -** Revisions: -** -** 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 - -/* Symbols: These are undefined at the end of this file to restore the - values they have in Xv.h */ - -#define XvPortID CARD32 -#define XvEncodingID CARD32 -#define ShmSeg CARD32 -#define VisualID CARD32 -#define Drawable CARD32 -#define GContext CARD32 -#define Time CARD32 -#define Atom CARD32 - -/* Structures */ - -typedef struct { - INT32 numerator B32; - INT32 denominator B32; -} xvRational; -#define sz_xvRational 8 - -typedef struct { - XvPortID base_id B32; - CARD16 name_size B16; - CARD16 num_ports B16; - CARD16 num_formats B16; - CARD8 type; - CARD8 pad; -} xvAdaptorInfo; -#define sz_xvAdaptorInfo 12 - -typedef struct { - XvEncodingID encoding B32; - CARD16 name_size B16; - CARD16 width B16, height B16; - xvRational rate; - CARD16 pad B16; -} xvEncodingInfo; -#define sz_xvEncodingInfo (12 + sz_xvRational) - -typedef struct { - VisualID visual B32; - CARD8 depth; - CARD8 pad1; - CARD16 pad2 B16; -} xvFormat; -#define sz_xvFormat 8 - -typedef struct { - CARD32 flags B32; - INT32 min B32; - INT32 max B32; - CARD32 size B32; -} xvAttributeInfo; -#define sz_xvAttributeInfo 16 - -typedef struct { - CARD32 id B32; - CARD8 type; - CARD8 byte_order; - CARD16 pad1 B16; - CARD8 guid[16]; - CARD8 bpp; - CARD8 num_planes; - CARD16 pad2 B16; - CARD8 depth; - CARD8 pad3; - CARD16 pad4 B16; - CARD32 red_mask B32; - CARD32 green_mask B32; - CARD32 blue_mask B32; - CARD8 format; - CARD8 pad5; - CARD16 pad6 B16; - CARD32 y_sample_bits B32; - CARD32 u_sample_bits B32; - CARD32 v_sample_bits B32; - CARD32 horz_y_period B32; - CARD32 horz_u_period B32; - CARD32 horz_v_period B32; - CARD32 vert_y_period B32; - CARD32 vert_u_period B32; - CARD32 vert_v_period B32; - CARD8 comp_order[32]; - CARD8 scanline_order; - CARD8 pad7; - CARD16 pad8 B16; - CARD32 pad9 B32; - CARD32 pad10 B32; -} xvImageFormatInfo; -#define sz_xvImageFormatInfo 128 - - -/* Requests */ - -#define xv_QueryExtension 0 -#define xv_QueryAdaptors 1 -#define xv_QueryEncodings 2 -#define xv_GrabPort 3 -#define xv_UngrabPort 4 -#define xv_PutVideo 5 -#define xv_PutStill 6 -#define xv_GetVideo 7 -#define xv_GetStill 8 -#define xv_StopVideo 9 -#define xv_SelectVideoNotify 10 -#define xv_SelectPortNotify 11 -#define xv_QueryBestSize 12 -#define xv_SetPortAttribute 13 -#define xv_GetPortAttribute 14 -#define xv_QueryPortAttributes 15 -#define xv_ListImageFormats 16 -#define xv_QueryImageAttributes 17 -#define xv_PutImage 18 -#define xv_ShmPutImage 19 -#define xv_LastRequest xv_ShmPutImage - -#define xvNumRequests (xv_LastRequest + 1) - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; -} xvQueryExtensionReq; -#define sz_xvQueryExtensionReq 4 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - CARD32 window B32; -} xvQueryAdaptorsReq; -#define sz_xvQueryAdaptorsReq 8 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - CARD32 port B32; -} xvQueryEncodingsReq; -#define sz_xvQueryEncodingsReq 8 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Drawable drawable B32; - GContext gc B32; - INT16 vid_x B16; - INT16 vid_y B16; - CARD16 vid_w B16; - CARD16 vid_h B16; - INT16 drw_x B16; - INT16 drw_y B16; - CARD16 drw_w B16; - CARD16 drw_h B16; -} xvPutVideoReq; -#define sz_xvPutVideoReq 32 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Drawable drawable B32; - GContext gc B32; - INT16 vid_x B16; - INT16 vid_y B16; - CARD16 vid_w B16; - CARD16 vid_h B16; - INT16 drw_x B16; - INT16 drw_y B16; - CARD16 drw_w B16; - CARD16 drw_h B16; -} xvPutStillReq; -#define sz_xvPutStillReq 32 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Drawable drawable B32; - GContext gc B32; - INT16 vid_x B16; - INT16 vid_y B16; - CARD16 vid_w B16; - CARD16 vid_h B16; - INT16 drw_x B16; - INT16 drw_y B16; - CARD16 drw_w B16; - CARD16 drw_h B16; -} xvGetVideoReq; -#define sz_xvGetVideoReq 32 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Drawable drawable B32; - GContext gc B32; - INT16 vid_x B16; - INT16 vid_y B16; - CARD16 vid_w B16; - CARD16 vid_h B16; - INT16 drw_x B16; - INT16 drw_y B16; - CARD16 drw_w B16; - CARD16 drw_h B16; -} xvGetStillReq; -#define sz_xvGetStillReq 32 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Time time B32; -} xvGrabPortReq; -#define sz_xvGrabPortReq 12 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Time time B32; -} xvUngrabPortReq; -#define sz_xvUngrabPortReq 12 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - Drawable drawable B32; - BOOL onoff; - CARD8 pad1; - CARD16 pad2; -} xvSelectVideoNotifyReq; -#define sz_xvSelectVideoNotifyReq 12 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - BOOL onoff; - CARD8 pad1; - CARD16 pad2; -} xvSelectPortNotifyReq; -#define sz_xvSelectPortNotifyReq 12 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Drawable drawable B32; -} xvStopVideoReq; -#define sz_xvStopVideoReq 12 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Atom attribute B32; - INT32 value B32; -} xvSetPortAttributeReq; -#define sz_xvSetPortAttributeReq 16 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Atom attribute B32; -} xvGetPortAttributeReq; -#define sz_xvGetPortAttributeReq 12 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - CARD16 vid_w B16; - CARD16 vid_h B16; - CARD16 drw_w B16; - CARD16 drw_h B16; - CARD8 motion; - CARD8 pad1; - CARD16 pad2 B16; -} xvQueryBestSizeReq; -#define sz_xvQueryBestSizeReq 20 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; -} xvQueryPortAttributesReq; -#define sz_xvQueryPortAttributesReq 8 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Drawable drawable B32; - GContext gc B32; - CARD32 id B32; - INT16 src_x B16; - INT16 src_y B16; - CARD16 src_w B16; - CARD16 src_h B16; - INT16 drw_x B16; - INT16 drw_y B16; - CARD16 drw_w B16; - CARD16 drw_h B16; - CARD16 width B16; - CARD16 height B16; -} xvPutImageReq; -#define sz_xvPutImageReq 40 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; - Drawable drawable B32; - GContext gc B32; - ShmSeg shmseg B32; - CARD32 id B32; - CARD32 offset B32; - INT16 src_x B16; - INT16 src_y B16; - CARD16 src_w B16; - CARD16 src_h B16; - INT16 drw_x B16; - INT16 drw_y B16; - CARD16 drw_w B16; - CARD16 drw_h B16; - CARD16 width B16; - CARD16 height B16; - CARD8 send_event; - CARD8 pad1; - CARD16 pad2 B16; -} xvShmPutImageReq; -#define sz_xvShmPutImageReq 52 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - XvPortID port B32; -} xvListImageFormatsReq; -#define sz_xvListImageFormatsReq 8 - -typedef struct { - CARD8 reqType; - CARD8 xvReqType; - CARD16 length B16; - CARD32 port B32; - CARD32 id B32; - CARD16 width B16; - CARD16 height B16; -} xvQueryImageAttributesReq; -#define sz_xvQueryImageAttributesReq 16 - - -/* Replies */ - -typedef struct _QueryExtensionReply { - BYTE type; /* X_Reply */ - CARD8 padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 version B16; - CARD16 revision B16; - CARD32 padl4 B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xvQueryExtensionReply; -#define sz_xvQueryExtensionReply 32 - -typedef struct _QueryAdaptorsReply { - BYTE type; /* X_Reply */ - CARD8 padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 num_adaptors B16; - CARD16 pads3 B16; - CARD32 padl4 B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xvQueryAdaptorsReply; -#define sz_xvQueryAdaptorsReply 32 - -typedef struct _QueryEncodingsReply { - BYTE type; /* X_Reply */ - CARD8 padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 num_encodings B16; - CARD32 padl3 B32; - CARD32 padl4 B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xvQueryEncodingsReply; -#define sz_xvQueryEncodingsReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE result; - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - CARD32 padl3 B32; - CARD32 padl4 B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xvGrabPortReply; -#define sz_xvGrabPortReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - INT32 value B32; - CARD32 padl4 B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xvGetPortAttributeReply; -#define sz_xvGetPortAttributeReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - CARD16 actual_width B16; - CARD16 actual_height B16; - CARD32 padl4 B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xvQueryBestSizeReply; -#define sz_xvQueryBestSizeReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; /* 0 */ - CARD32 num_attributes B32; - CARD32 text_size B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xvQueryPortAttributesReply; -#define sz_xvQueryPortAttributesReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 num_formats B32; - CARD32 padl4 B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xvListImageFormatsReply; -#define sz_xvListImageFormatsReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - BYTE padb1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 num_planes B32; - CARD32 data_size B32; - CARD16 width B16; - CARD16 height B16; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; -} xvQueryImageAttributesReply; -#define sz_xvQueryImageAttributesReply 32 - -/* DEFINE EVENT STRUCTURE */ - -typedef struct { - union { - struct { - BYTE type; - BYTE detail; - CARD16 sequenceNumber B16; - } u; - struct { - BYTE type; - BYTE reason; - CARD16 sequenceNumber B16; - Time time B32; - Drawable drawable B32; - XvPortID port B32; - CARD32 padl5 B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; - } videoNotify; - struct { - BYTE type; - BYTE padb1; - CARD16 sequenceNumber B16; - Time time B32; - XvPortID port B32; - Atom attribute B32; - INT32 value B32; - CARD32 padl6 B32; - CARD32 padl7 B32; - CARD32 padl8 B32; - } portNotify; - } u; -} xvEvent; - -#undef XvPortID -#undef XvEncodingID -#undef ShmSeg -#undef VisualID -#undef Drawable -#undef GContext -#undef Time -#undef Atom - -#endif /* XVPROTO_H */ - diff --git a/apps/plugins/sdl/src/video/Xext/extensions/extutil.h b/apps/plugins/sdl/src/video/Xext/extensions/extutil.h deleted file mode 100644 index f3a741ea22..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/extutil.h +++ /dev/null @@ -1,226 +0,0 @@ -/* - * $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ - * -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. - * - * Author: Jim Fulton, MIT The Open Group - * - * Xlib Extension-Writing Utilities - * - * This package contains utilities for writing the client API for various - * protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND - * ARE SUBJECT TO CHANGE! - */ -/* $XFree86: xc/include/extensions/extutil.h,v 1.9 2001/12/14 19:53:28 dawes Exp $ */ - -#ifndef _EXTUTIL_H_ -#define _EXTUTIL_H_ - -#include "SDL_stdinc.h" /* For portable string functions */ - -#include "./Xext.h" - -/* - * We need to keep a list of open displays since the Xlib display list isn't - * public. We also have to per-display info in a separate block since it isn't - * stored directly in the Display structure. - */ -typedef struct _XExtDisplayInfo { - struct _XExtDisplayInfo *next; /* keep a linked list */ - Display *display; /* which display this is */ - XExtCodes *codes; /* the extension protocol codes */ - XPointer data; /* extra data for extension to use */ -} XExtDisplayInfo; - -typedef struct _XExtensionInfo { - XExtDisplayInfo *head; /* start of list */ - XExtDisplayInfo *cur; /* most recently used */ - int ndisplays; /* number of displays */ -} XExtensionInfo; - -typedef struct _XExtensionHooks { - int (*create_gc)( -#if NeedNestedPrototypes - Display* /* display */, - GC /* gc */, - XExtCodes* /* codes */ -#endif -); - int (*copy_gc)( -#if NeedNestedPrototypes - Display* /* display */, - GC /* gc */, - XExtCodes* /* codes */ -#endif -); - int (*flush_gc)( -#if NeedNestedPrototypes - Display* /* display */, - GC /* gc */, - XExtCodes* /* codes */ -#endif -); - int (*free_gc)( -#if NeedNestedPrototypes - Display* /* display */, - GC /* gc */, - XExtCodes* /* codes */ -#endif -); - int (*create_font)( -#if NeedNestedPrototypes - Display* /* display */, - XFontStruct* /* fs */, - XExtCodes* /* codes */ -#endif -); - int (*free_font)( -#if NeedNestedPrototypes - Display* /* display */, - XFontStruct* /* fs */, - XExtCodes* /* codes */ -#endif -); - int (*close_display)( -#if NeedNestedPrototypes - Display* /* display */, - XExtCodes* /* codes */ -#endif -); - Bool (*wire_to_event)( -#if NeedNestedPrototypes - Display* /* display */, - XEvent* /* re */, - xEvent* /* event */ -#endif -); - Status (*event_to_wire)( -#if NeedNestedPrototypes - Display* /* display */, - XEvent* /* re */, - xEvent* /* event */ -#endif -); - int (*error)( -#if NeedNestedPrototypes - Display* /* display */, - xError* /* err */, - XExtCodes* /* codes */, - int* /* ret_code */ -#endif -); - char *(*error_string)( -#if NeedNestedPrototypes - Display* /* display */, - int /* code */, - XExtCodes* /* codes */, - char* /* buffer */, - int /* nbytes */ -#endif -); -} XExtensionHooks; - -extern XExtensionInfo *XextCreateExtension( -#if NeedFunctionPrototypes - void -#endif -); -extern void XextDestroyExtension( -#if NeedFunctionPrototypes - XExtensionInfo* /* info */ -#endif -); -extern XExtDisplayInfo *XextAddDisplay( -#if NeedFunctionPrototypes - XExtensionInfo* /* extinfo */, - Display* /* dpy */, - char* /* ext_name */, - XExtensionHooks* /* hooks */, - int /* nevents */, - XPointer /* data */ -#endif -); -extern int XextRemoveDisplay( -#if NeedFunctionPrototypes - XExtensionInfo* /* extinfo */, - Display* /* dpy */ -#endif -); -extern XExtDisplayInfo *XextFindDisplay( -#if NeedFunctionPrototypes - XExtensionInfo* /* extinfo */, - Display* /* dpy */ -#endif -); - -#define XextHasExtension(i) ((i) && ((i)->codes)) -#define XextCheckExtension(dpy,i,name,val) \ - if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; } -#define XextSimpleCheckExtension(dpy,i,name) \ - if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; } - - -/* - * helper macros to generate code that is common to all extensions; caller - * should prefix it with static if extension source is in one file; this - * could be a utility function, but have to stack 6 unused arguments for - * something that is called many, many times would be bad. - */ -#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \ -XExtDisplayInfo *proc (Display *dpy) \ -{ \ - XExtDisplayInfo *dpyinfo; \ - if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \ - if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \ - dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \ - return dpyinfo; \ -} - -#define XEXT_FIND_DISPLAY_PROTO(proc) \ - XExtDisplayInfo *proc(Display *dpy) - -#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \ -int proc (Display *dpy, XExtCodes *codes) \ -{ \ - return XextRemoveDisplay (extinfo, dpy); \ -} - -#define XEXT_CLOSE_DISPLAY_PROTO(proc) \ - int proc(Display *dpy, XExtCodes *codes) - -#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \ -char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \ -{ \ - code -= codes->first_error; \ - if (code >= 0 && code < nerr) { \ - char tmp[256]; \ - SDL_snprintf (tmp, SDL_arraysize(tmp), "%s.%d", extname, code); \ - XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \ - return buf; \ - } \ - return (char *)0; \ -} - -#define XEXT_ERROR_STRING_PROTO(proc) \ - char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n) -#endif diff --git a/apps/plugins/sdl/src/video/Xext/extensions/panoramiXext.h b/apps/plugins/sdl/src/video/Xext/extensions/panoramiXext.h deleted file mode 100644 index e89d8917bb..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/panoramiXext.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $Xorg: panoramiXext.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */ -/***************************************************************** -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. -******************************************************************/ -/* - * PanoramiX definitions - */ -/* $XFree86: xc/include/extensions/panoramiXext.h,v 3.6 2001/01/17 17:53:22 dawes Exp $ */ - -#include "SDL_name.h" - -/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ - -#define PANORAMIX_MAJOR_VERSION 1 /* current version number */ -#define PANORAMIX_MINOR_VERSION 1 - -typedef struct { - Window window; /* PanoramiX window - may not exist */ - int screen; - int State; /* PanroamiXOff, PanoramiXOn */ - int width; /* width of this screen */ - int height; /* height of this screen */ - int ScreenCount; /* real physical number of screens */ - XID eventMask; /* selected events for this client */ -} SDL_NAME(XPanoramiXInfo); - -extern SDL_NAME(XPanoramiXInfo) *SDL_NAME(XPanoramiXAllocInfo) ( -#if NeedFunctionPrototypes - void -#endif -); diff --git a/apps/plugins/sdl/src/video/Xext/extensions/panoramiXproto.h b/apps/plugins/sdl/src/video/Xext/extensions/panoramiXproto.h deleted file mode 100644 index fe3826eb3b..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/panoramiXproto.h +++ /dev/null @@ -1,192 +0,0 @@ -/* $Xorg: panoramiXproto.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */ -/***************************************************************** -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. -******************************************************************/ -/* $XFree86: xc/include/extensions/panoramiXproto.h,v 3.6 2001/01/17 17:53:22 dawes Exp $ */ - -/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ - -#ifndef _PANORAMIXPROTO_H_ -#define _PANORAMIXPROTO_H_ - -#define PANORAMIX_PROTOCOL_NAME "XINERAMA" - -#define X_PanoramiXQueryVersion 0 -#define X_PanoramiXGetState 1 -#define X_PanoramiXGetScreenCount 2 -#define X_PanoramiXGetScreenSize 3 - -#define X_XineramaIsActive 4 -#define X_XineramaQueryScreens 5 - -typedef struct _PanoramiXQueryVersion { - CARD8 reqType; /* always PanoramiXReqCode */ - CARD8 panoramiXReqType; /* always X_PanoramiXQueryVersion */ - CARD16 length B16; - CARD8 clientMajor; - CARD8 clientMinor; - CARD16 unused B16; -} xPanoramiXQueryVersionReq; - -#define sz_xPanoramiXQueryVersionReq 8 - -typedef struct { - CARD8 type; /* must be X_Reply */ - CARD8 pad1; /* unused */ - CARD16 sequenceNumber B16; /* last sequence number */ - CARD32 length B32; /* 0 */ - CARD16 majorVersion B16; - CARD16 minorVersion B16; - CARD32 pad2 B32; /* unused */ - CARD32 pad3 B32; /* unused */ - CARD32 pad4 B32; /* unused */ - CARD32 pad5 B32; /* unused */ - CARD32 pad6 B32; /* unused */ -} xPanoramiXQueryVersionReply; - -#define sz_xPanoramiXQueryVersionReply 32 - - -typedef struct _PanoramiXGetState { - CARD8 reqType; /* always PanoramiXReqCode */ - CARD8 panoramiXReqType; /* always X_PanoramiXGetState */ - CARD16 length B16; - CARD32 window B32; -} xPanoramiXGetStateReq; -#define sz_xPanoramiXGetStateReq 8 - -typedef struct { - BYTE type; - BYTE state; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 window B32; - CARD32 pad1 B32; /* unused */ - CARD32 pad2 B32; /* unused */ - CARD32 pad3 B32; /* unused */ - CARD32 pad4 B32; /* unused */ - CARD32 pad5 B32; /* unused */ -} xPanoramiXGetStateReply; - -#define sz_panoramiXGetStateReply 32 - -typedef struct _PanoramiXGetScreenCount { - CARD8 reqType; /* always PanoramiXReqCode */ - CARD8 panoramiXReqType; /* always X_PanoramiXGetScreenCount */ - CARD16 length B16; - CARD32 window B32; -} xPanoramiXGetScreenCountReq; -#define sz_xPanoramiXGetScreenCountReq 8 - -typedef struct { - BYTE type; - BYTE ScreenCount; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 window B32; - CARD32 pad1 B32; /* unused */ - CARD32 pad2 B32; /* unused */ - CARD32 pad3 B32; /* unused */ - CARD32 pad4 B32; /* unused */ - CARD32 pad5 B32; /* unused */ -} xPanoramiXGetScreenCountReply; -#define sz_panoramiXGetScreenCountReply 32 - -typedef struct _PanoramiXGetScreenSize { - CARD8 reqType; /* always PanoramiXReqCode */ - CARD8 panoramiXReqType; /* always X_PanoramiXGetState */ - CARD16 length B16; - CARD32 window B32; - CARD32 screen B32; -} xPanoramiXGetScreenSizeReq; -#define sz_xPanoramiXGetScreenSizeReq 12 - -typedef struct { - BYTE type; - CARD8 pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 width B32; - CARD32 height B32; - CARD32 window B32; - CARD32 screen B32; - CARD32 pad2 B32; /* unused */ - CARD32 pad3 B32; /* unused */ -} xPanoramiXGetScreenSizeReply; -#define sz_panoramiXGetScreenSizeReply 32 - -/************ Alternate protocol ******************/ - -typedef struct { - CARD8 reqType; - CARD8 panoramiXReqType; - CARD16 length B16; -} xXineramaIsActiveReq; -#define sz_xXineramaIsActiveReq 4 - -typedef struct { - BYTE type; - CARD8 pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 state B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXineramaIsActiveReply; -#define sz_XineramaIsActiveReply 32 - - -typedef struct { - CARD8 reqType; - CARD8 panoramiXReqType; - CARD16 length B16; -} xXineramaQueryScreensReq; -#define sz_xXineramaQueryScreensReq 4 - -typedef struct { - BYTE type; - CARD8 pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 number B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXineramaQueryScreensReply; -#define sz_XineramaQueryScreensReply 32 - -typedef struct { - INT16 x_org B16; - INT16 y_org B16; - CARD16 width B16; - CARD16 height B16; -} xXineramaScreenInfo; -#define sz_XineramaScreenInfo 8 - -#endif diff --git a/apps/plugins/sdl/src/video/Xext/extensions/xf86dga.h b/apps/plugins/sdl/src/video/Xext/extensions/xf86dga.h deleted file mode 100644 index c71ef4b14a..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/xf86dga.h +++ /dev/null @@ -1,265 +0,0 @@ -/* - Copyright (c) 1999 XFree86 Inc -*/ -/* $XFree86: xc/include/extensions/xf86dga.h,v 3.21 2001/08/01 00:44:36 tsi Exp $ */ - -#ifndef _XF86DGA_H_ -#define _XF86DGA_H_ - -#include -#include "xf86dga1.h" -#include "SDL_name.h" - -#define X_XDGAQueryVersion 0 - -/* 1 through 9 are in xf86dga1.h */ - -/* 10 and 11 are reserved to avoid conflicts with rogue DGA extensions */ - -#define X_XDGAQueryModes 12 -#define X_XDGASetMode 13 -#define X_XDGASetViewport 14 -#define X_XDGAInstallColormap 15 -#define X_XDGASelectInput 16 -#define X_XDGAFillRectangle 17 -#define X_XDGACopyArea 18 -#define X_XDGACopyTransparentArea 19 -#define X_XDGAGetViewportStatus 20 -#define X_XDGASync 21 -#define X_XDGAOpenFramebuffer 22 -#define X_XDGACloseFramebuffer 23 -#define X_XDGASetClientVersion 24 -#define X_XDGAChangePixmapMode 25 -#define X_XDGACreateColormap 26 - - -#define XDGAConcurrentAccess 0x00000001 -#define XDGASolidFillRect 0x00000002 -#define XDGABlitRect 0x00000004 -#define XDGABlitTransRect 0x00000008 -#define XDGAPixmap 0x00000010 - -#define XDGAInterlaced 0x00010000 -#define XDGADoublescan 0x00020000 - -#define XDGAFlipImmediate 0x00000001 -#define XDGAFlipRetrace 0x00000002 - -#define XDGANeedRoot 0x00000001 - -#define XF86DGANumberEvents 7 - -#define XDGAPixmapModeLarge 0 -#define XDGAPixmapModeSmall 1 - -#define XF86DGAClientNotLocal 0 -#define XF86DGANoDirectVideoMode 1 -#define XF86DGAScreenNotActive 2 -#define XF86DGADirectNotActivated 3 -#define XF86DGAOperationNotSupported 4 -#define XF86DGANumberErrors (XF86DGAOperationNotSupported + 1) - - -typedef struct { - int num; /* A unique identifier for the mode (num > 0) */ - char *name; /* name of mode given in the XF86Config */ - float verticalRefresh; - int flags; /* DGA_CONCURRENT_ACCESS, etc... */ - int imageWidth; /* linear accessible portion (pixels) */ - int imageHeight; - int pixmapWidth; /* Xlib accessible portion (pixels) */ - int pixmapHeight; /* both fields ignored if no concurrent access */ - int bytesPerScanline; - int byteOrder; /* MSBFirst, LSBFirst */ - int depth; - int bitsPerPixel; - unsigned long redMask; - unsigned long greenMask; - unsigned long blueMask; - short visualClass; - int viewportWidth; - int viewportHeight; - int xViewportStep; /* viewport position granularity */ - int yViewportStep; - int maxViewportX; /* max viewport origin */ - int maxViewportY; - int viewportFlags; /* types of page flipping possible */ - int reserved1; - int reserved2; -} SDL_NAME(XDGAMode); - - -typedef struct { - SDL_NAME(XDGAMode) mode; - unsigned char *data; - Pixmap pixmap; -} SDL_NAME(XDGADevice); - - -#ifndef _XF86DGA_SERVER_ -_XFUNCPROTOBEGIN - -typedef struct { - int type; - unsigned long serial; - Display *display; - int screen; - Time time; - unsigned int state; - unsigned int button; -} SDL_NAME(XDGAButtonEvent); - -typedef struct { - int type; - unsigned long serial; - Display *display; - int screen; - Time time; - unsigned int state; - unsigned int keycode; -} SDL_NAME(XDGAKeyEvent); - -typedef struct { - int type; - unsigned long serial; - Display *display; - int screen; - Time time; - unsigned int state; - int dx; - int dy; -} SDL_NAME(XDGAMotionEvent); - -typedef union { - int type; - SDL_NAME(XDGAButtonEvent) xbutton; - SDL_NAME(XDGAKeyEvent) xkey; - SDL_NAME(XDGAMotionEvent) xmotion; - long pad[24]; -} SDL_NAME(XDGAEvent); - -Bool SDL_NAME(XDGAQueryExtension)( - Display *dpy, - int *eventBase, - int *erroBase -); - -Bool SDL_NAME(XDGAQueryVersion)( - Display *dpy, - int *majorVersion, - int *minorVersion -); - -SDL_NAME(XDGAMode)* SDL_NAME(XDGAQueryModes)( - Display *dpy, - int screen, - int *num -); - -SDL_NAME(XDGADevice)* SDL_NAME(XDGASetMode)( - Display *dpy, - int screen, - int mode -); - -Bool SDL_NAME(XDGAOpenFramebuffer)( - Display *dpy, - int screen -); - -void SDL_NAME(XDGACloseFramebuffer)( - Display *dpy, - int screen -); - -void SDL_NAME(XDGASetViewport)( - Display *dpy, - int screen, - int x, - int y, - int flags -); - -void SDL_NAME(XDGAInstallColormap)( - Display *dpy, - int screen, - Colormap cmap -); - -Colormap SDL_NAME(XDGACreateColormap)( - Display *dpy, - int screen, - SDL_NAME(XDGADevice) *device, - int alloc -); - -void SDL_NAME(XDGASelectInput)( - Display *dpy, - int screen, - long event_mask -); - -void SDL_NAME(XDGAFillRectangle)( - Display *dpy, - int screen, - int x, - int y, - unsigned int width, - unsigned int height, - unsigned long color -); - - -void SDL_NAME(XDGACopyArea)( - Display *dpy, - int screen, - int srcx, - int srcy, - unsigned int width, - unsigned int height, - int dstx, - int dsty -); - - -void SDL_NAME(XDGACopyTransparentArea)( - Display *dpy, - int screen, - int srcx, - int srcy, - unsigned int width, - unsigned int height, - int dstx, - int dsty, - unsigned long key -); - -int SDL_NAME(XDGAGetViewportStatus)( - Display *dpy, - int screen -); - -void SDL_NAME(XDGASync)( - Display *dpy, - int screen -); - -Bool SDL_NAME(XDGASetClientVersion)( - Display *dpy -); - -void SDL_NAME(XDGAChangePixmapMode)( - Display *dpy, - int screen, - int *x, - int *y, - int mode -); - - -void SDL_NAME(XDGAKeyEventToXKeyEvent)(SDL_NAME(XDGAKeyEvent)* dk, XKeyEvent* xk); - - -_XFUNCPROTOEND -#endif /* _XF86DGA_SERVER_ */ -#endif /* _XF86DGA_H_ */ diff --git a/apps/plugins/sdl/src/video/Xext/extensions/xf86dga1.h b/apps/plugins/sdl/src/video/Xext/extensions/xf86dga1.h deleted file mode 100644 index 4a49e9f385..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/xf86dga1.h +++ /dev/null @@ -1,169 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86dga1.h,v 1.2 1999/04/17 07:05:41 dawes Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995 XFree86 Inc - -*/ - -/************************************************************************ - - THIS IS THE OLD DGA API AND IS OBSOLETE. PLEASE DO NOT USE IT ANYMORE - -************************************************************************/ - -#ifndef _XF86DGA1_H_ -#define _XF86DGA1_H_ - -#include -#include "SDL_name.h" - -#define X_XF86DGAQueryVersion 0 -#define X_XF86DGAGetVideoLL 1 -#define X_XF86DGADirectVideo 2 -#define X_XF86DGAGetViewPortSize 3 -#define X_XF86DGASetViewPort 4 -#define X_XF86DGAGetVidPage 5 -#define X_XF86DGASetVidPage 6 -#define X_XF86DGAInstallColormap 7 -#define X_XF86DGAQueryDirectVideo 8 -#define X_XF86DGAViewPortChanged 9 - -#define XF86DGADirectPresent 0x0001 -#define XF86DGADirectGraphics 0x0002 -#define XF86DGADirectMouse 0x0004 -#define XF86DGADirectKeyb 0x0008 -#define XF86DGAHasColormap 0x0100 -#define XF86DGADirectColormap 0x0200 - - - - -#ifndef _XF86DGA_SERVER_ - -_XFUNCPROTOBEGIN - -Bool SDL_NAME(XF86DGAQueryVersion)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -#endif -); - -Bool SDL_NAME(XF86DGAQueryExtension)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -#endif -); - -Status SDL_NAME(XF86DGAGetVideoLL)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - int * /* base addr */, - int * /* width */, - int * /* bank_size */, - int * /* ram_size */ -#endif -); - -Status SDL_NAME(XF86DGAGetVideo)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - char ** /* base addr */, - int * /* width */, - int * /* bank_size */, - int * /* ram_size */ -#endif -); - -Status SDL_NAME(XF86DGADirectVideo)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - int /* enable */ -#endif -); - -Status SDL_NAME(XF86DGADirectVideoLL)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - int /* enable */ -#endif -); - -Status SDL_NAME(XF86DGAGetViewPortSize)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - int * /* width */, - int * /* height */ -#endif -); - -Status SDL_NAME(XF86DGASetViewPort)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - int x /* X */, - int y /* Y */ -#endif -); - -Status SDL_NAME(XF86DGAGetVidPage)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - int * /* vid page */ -#endif -); - -Status SDL_NAME(XF86DGASetVidPage)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - int /* vid page */ -#endif -); - -Status SDL_NAME(XF86DGAInstallColormap)( -#if NeedFunctionPrototypes - Display* /* dpy */, - int /* screen */, - Colormap /*Colormap */ -#endif -); - -int SDL_NAME(XF86DGAForkApp)( -#if NeedFunctionPrototypes - int screen -#endif -); - -Status SDL_NAME(XF86DGAQueryDirectVideo)( -#if NeedFunctionPrototypes - Display * /* dpy */, - int /* screen */, - int * /* flags */ -#endif -); - -Bool SDL_NAME(XF86DGAViewPortChanged)( -#if NeedFunctionPrototypes - Display * /* dpy */, - int /* screen */, - int /* n */ -#endif -); - - -_XFUNCPROTOEND - -#endif /* _XF86DGA_SERVER_ */ - -#endif /* _XF86DGA1_H_ */ diff --git a/apps/plugins/sdl/src/video/Xext/extensions/xf86dga1str.h b/apps/plugins/sdl/src/video/Xext/extensions/xf86dga1str.h deleted file mode 100644 index 5695fbd13b..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/xf86dga1str.h +++ /dev/null @@ -1,194 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86dga1str.h,v 1.2 1999/05/03 12:15:37 dawes Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995 XFree86 Inc. - -*/ - -#ifndef _XF86DGASTR1_H_ -#define _XF86DGASTR1_H_ - -typedef struct _XF86DGAQueryVersion { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; -} xXF86DGAQueryVersionReq; -#define sz_xXF86DGAQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of DGA protocol */ - CARD16 minorVersion B16; /* minor version of DGA protocol */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86DGAQueryVersionReply; -#define sz_xXF86DGAQueryVersionReply 32 - -typedef struct _XF86DGAGetVideoLL { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGAGetVideoLL */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAGetVideoLLReq; -#define sz_xXF86DGAGetVideoLLReq 8 - -typedef struct _XF86DGAInstallColormap{ - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad2; - CARD32 id B32; /* colormap. */ -} xXF86DGAInstallColormapReq; -#define sz_xXF86DGAInstallColormapReq 12 - - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 offset B32; - CARD32 width B32; - CARD32 bank_size B32; - CARD32 ram_size B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAGetVideoLLReply; -#define sz_xXF86DGAGetVideoLLReply 32 - -typedef struct _XF86DGADirectVideo { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGADirectVideo */ - CARD16 length B16; - CARD16 screen B16; - CARD16 enable B16; -} xXF86DGADirectVideoReq; -#define sz_xXF86DGADirectVideoReq 8 - - -typedef struct _XF86DGAGetViewPortSize { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGAGetViewPort */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAGetViewPortSizeReq; -#define sz_xXF86DGAGetViewPortSizeReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 width B32; - CARD32 height B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAGetViewPortSizeReply; -#define sz_xXF86DGAGetViewPortSizeReply 32 - -typedef struct _XF86DGASetViewPort { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGASetViewPort */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 x B32; - CARD32 y B32; -} xXF86DGASetViewPortReq; -#define sz_xXF86DGASetViewPortReq 16 - -typedef struct _XF86DGAGetVidPage { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGAGetVidPage */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAGetVidPageReq; -#define sz_xXF86DGAGetVidPageReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 vpage B32; - CARD32 pad B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAGetVidPageReply; -#define sz_xXF86DGAGetVidPageReply 32 - - -typedef struct _XF86DGASetVidPage { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_XF86DGASetVidPage */ - CARD16 length B16; - CARD16 screen B16; - CARD16 vpage B16; -} xXF86DGASetVidPageReq; -#define sz_xXF86DGASetVidPageReq 8 - - -typedef struct _XF86DGAQueryDirectVideo { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86DGAQueryDirectVideoReq; -#define sz_xXF86DGAQueryDirectVideoReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 flags B32; - CARD32 pad B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAQueryDirectVideoReply; -#define sz_xXF86DGAQueryDirectVideoReply 32 - - -typedef struct _XF86DGAViewPortChanged { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; - CARD16 screen B16; - CARD16 n B16; -} xXF86DGAViewPortChangedReq; -#define sz_xXF86DGAViewPortChangedReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 result B32; - CARD32 pad B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86DGAViewPortChangedReply; -#define sz_xXF86DGAViewPortChangedReply 32 - -#endif /* _XF86DGASTR1_H_ */ - diff --git a/apps/plugins/sdl/src/video/Xext/extensions/xf86dgastr.h b/apps/plugins/sdl/src/video/Xext/extensions/xf86dgastr.h deleted file mode 100644 index b249feb3c6..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/xf86dgastr.h +++ /dev/null @@ -1,344 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86dgastr.h,v 3.14 2001/08/01 00:44:36 tsi Exp $ */ -/* - -Copyright (c) 1995 Jon Tombs -Copyright (c) 1995 XFree86 Inc. - -*/ - -#ifndef _XF86DGASTR_H_ -#define _XF86DGASTR_H_ - -#include "xf86dga1str.h" - -#define XF86DGANAME "XFree86-DGA" - -#define XDGA_MAJOR_VERSION 2 /* current version numbers */ -#define XDGA_MINOR_VERSION 0 - - -typedef struct _XDGAQueryVersion { - CARD8 reqType; /* always DGAReqCode */ - CARD8 dgaReqType; /* always X_DGAQueryVersion */ - CARD16 length B16; -} xXDGAQueryVersionReq; -#define sz_xXDGAQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of DGA protocol */ - CARD16 minorVersion B16; /* minor version of DGA protocol */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXDGAQueryVersionReply; -#define sz_xXDGAQueryVersionReply 32 - -typedef struct _XDGAQueryModes { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGAQueryModesReq; -#define sz_xXDGAQueryModesReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 number B32; /* number of modes available */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXDGAQueryModesReply; -#define sz_xXDGAQueryModesReply 32 - - -typedef struct _XDGASetMode { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 mode B32; /* mode number to init */ - CARD32 pid B32; /* Pixmap descriptor */ -} xXDGASetModeReq; -#define sz_xXDGASetModeReq 16 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 offset B32; /* offset into framebuffer map */ - CARD32 flags B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXDGASetModeReply; -#define sz_xXDGASetModeReply 32 - -typedef struct { - CARD8 byte_order; - CARD8 depth; - CARD16 num B16; - CARD16 bpp B16; - CARD16 name_size B16; - CARD32 vsync_num B32; - CARD32 vsync_den B32; - CARD32 flags B32; - CARD16 image_width B16; - CARD16 image_height B16; - CARD16 pixmap_width B16; - CARD16 pixmap_height B16; - CARD32 bytes_per_scanline B32; - CARD32 red_mask B32; - CARD32 green_mask B32; - CARD32 blue_mask B32; - CARD16 visual_class B16; - CARD16 pad1 B16; - CARD16 viewport_width B16; - CARD16 viewport_height B16; - CARD16 viewport_xstep B16; - CARD16 viewport_ystep B16; - CARD16 viewport_xmax B16; - CARD16 viewport_ymax B16; - CARD32 viewport_flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; -} xXDGAModeInfo; -#define sz_xXDGAModeInfo 72 - -typedef struct _XDGAOpenFramebuffer { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGAOpenFramebufferReq; -#define sz_xXDGAOpenFramebufferReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; /* device name size if there is one */ - CARD32 mem1 B32; /* physical memory */ - CARD32 mem2 B32; /* spillover for _alpha_ */ - CARD32 size B32; /* size of map in bytes */ - CARD32 offset B32; /* optional offset into device */ - CARD32 extra B32; /* extra info associated with the map */ - CARD32 pad2 B32; -} xXDGAOpenFramebufferReply; -#define sz_xXDGAOpenFramebufferReply 32 - - -typedef struct _XDGACloseFramebuffer { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGACloseFramebufferReq; -#define sz_xXDGACloseFramebufferReq 8 - - -typedef struct _XDGASetViewport { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 x B16; - CARD16 y B16; - CARD32 flags B32; -} xXDGASetViewportReq; -#define sz_xXDGASetViewportReq 16 - - -typedef struct _XDGAInstallColormap { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 cmap B32; -} xXDGAInstallColormapReq; -#define sz_xXDGAInstallColormapReq 12 - -typedef struct _XDGASelectInput { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 mask B32; -} xXDGASelectInputReq; -#define sz_xXDGASelectInputReq 12 - -typedef struct _XDGAFillRectangle { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 x B16; - CARD16 y B16; - CARD16 width B16; - CARD16 height B16; - CARD32 color B32; -} xXDGAFillRectangleReq; -#define sz_xXDGAFillRectangleReq 20 - - -typedef struct _XDGACopyArea { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 srcx B16; - CARD16 srcy B16; - CARD16 width B16; - CARD16 height B16; - CARD16 dstx B16; - CARD16 dsty B16; -} xXDGACopyAreaReq; -#define sz_xXDGACopyAreaReq 20 - -typedef struct _XDGACopyTransparentArea { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 srcx B16; - CARD16 srcy B16; - CARD16 width B16; - CARD16 height B16; - CARD16 dstx B16; - CARD16 dsty B16; - CARD32 key B32; -} xXDGACopyTransparentAreaReq; -#define sz_xXDGACopyTransparentAreaReq 24 - - -typedef struct _XDGAGetViewportStatus { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGAGetViewportStatusReq; -#define sz_xXDGAGetViewportStatusReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXDGAGetViewportStatusReply; -#define sz_xXDGAGetViewportStatusReply 32 - -typedef struct _XDGASync { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; -} xXDGASyncReq; -#define sz_xXDGASyncReq 8 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXDGASyncReply; -#define sz_xXDGASyncReply 32 - -typedef struct _XDGASetClientVersion { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD16 major B16; - CARD16 minor B16; -} xXDGASetClientVersionReq; -#define sz_xXDGASetClientVersionReq 8 - - -typedef struct { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD16 x B16; - CARD16 y B16; - CARD32 flags B32; -} xXDGAChangePixmapModeReq; -#define sz_xXDGAChangePixmapModeReq 16 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 x B16; - CARD16 y B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xXDGAChangePixmapModeReply; -#define sz_xXDGAChangePixmapModeReply 32 - -typedef struct _XDGACreateColormap { - CARD8 reqType; - CARD8 dgaReqType; - CARD16 length B16; - CARD32 screen B32; - CARD32 id B32; - CARD32 mode B32; - CARD8 alloc; - CARD8 pad1; - CARD16 pad2; -} xXDGACreateColormapReq; -#define sz_xXDGACreateColormapReq 20 - - -typedef struct { - union { - struct { - BYTE type; - BYTE detail; - CARD16 sequenceNumber B16; - } u; - struct { - CARD32 pad0 B32; - CARD32 time B32; - INT16 dx B16; - INT16 dy B16; - INT16 screen B16; - CARD16 state B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - } event; - } u; -} dgaEvent; - - -#endif /* _XF86DGASTR_H_ */ - diff --git a/apps/plugins/sdl/src/video/Xext/extensions/xf86vmode.h b/apps/plugins/sdl/src/video/Xext/extensions/xf86vmode.h deleted file mode 100644 index eb56c0e8da..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/xf86vmode.h +++ /dev/null @@ -1,314 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ */ -/* - -Copyright 1995 Kaleb S. KEITHLEY - -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 Kaleb S. KEITHLEY 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 Kaleb S. KEITHLEY -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -from Kaleb S. KEITHLEY - -*/ -/* $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#ifndef _XF86VIDMODE_H_ -#define _XF86VIDMODE_H_ - -#include -#include -#include "SDL_name.h" - -#define X_XF86VidModeQueryVersion 0 -#define X_XF86VidModeGetModeLine 1 -#define X_XF86VidModeModModeLine 2 -#define X_XF86VidModeSwitchMode 3 -#define X_XF86VidModeGetMonitor 4 -#define X_XF86VidModeLockModeSwitch 5 -#define X_XF86VidModeGetAllModeLines 6 -#define X_XF86VidModeAddModeLine 7 -#define X_XF86VidModeDeleteModeLine 8 -#define X_XF86VidModeValidateModeLine 9 -#define X_XF86VidModeSwitchToMode 10 -#define X_XF86VidModeGetViewPort 11 -#define X_XF86VidModeSetViewPort 12 -/* new for version 2.x of this extension */ -#define X_XF86VidModeGetDotClocks 13 -#define X_XF86VidModeSetClientVersion 14 -#define X_XF86VidModeSetGamma 15 -#define X_XF86VidModeGetGamma 16 -#define X_XF86VidModeGetGammaRamp 17 -#define X_XF86VidModeSetGammaRamp 18 -#define X_XF86VidModeGetGammaRampSize 19 - -#define CLKFLAG_PROGRAMABLE 1 - -#ifdef XF86VIDMODE_EVENTS -#define XF86VidModeNotify 0 -#define XF86VidModeNumberEvents (XF86VidModeNotify + 1) - -#define XF86VidModeNotifyMask 0x00000001 - -#define XF86VidModeNonEvent 0 -#define XF86VidModeModeChange 1 -#else -#define XF86VidModeNumberEvents 0 -#endif - -#define XF86VidModeBadClock 0 -#define XF86VidModeBadHTimings 1 -#define XF86VidModeBadVTimings 2 -#define XF86VidModeModeUnsuitable 3 -#define XF86VidModeExtensionDisabled 4 -#define XF86VidModeClientNotLocal 5 -#define XF86VidModeZoomLocked 6 -#define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1) - -#ifndef _XF86VIDMODE_SERVER_ - -typedef struct { - unsigned short hdisplay; - unsigned short hsyncstart; - unsigned short hsyncend; - unsigned short htotal; - unsigned short hskew; - unsigned short vdisplay; - unsigned short vsyncstart; - unsigned short vsyncend; - unsigned short vtotal; - unsigned int flags; - int privsize; -#if defined(__cplusplus) || defined(c_plusplus) - /* private is a C++ reserved word */ - INT32 *c_private; -#else - INT32 *private; -#endif -} SDL_NAME(XF86VidModeModeLine); - -typedef struct { - unsigned int dotclock; - unsigned short hdisplay; - unsigned short hsyncstart; - unsigned short hsyncend; - unsigned short htotal; - unsigned short hskew; - unsigned short vdisplay; - unsigned short vsyncstart; - unsigned short vsyncend; - unsigned short vtotal; - unsigned int flags; - int privsize; -#if defined(__cplusplus) || defined(c_plusplus) - /* private is a C++ reserved word */ - INT32 *c_private; -#else - INT32 *private; -#endif -} SDL_NAME(XF86VidModeModeInfo); - -typedef struct { - float hi; - float lo; -} SDL_NAME(XF86VidModeSyncRange); - -typedef struct { - char* vendor; - char* model; - float EMPTY; - unsigned char nhsync; - SDL_NAME(XF86VidModeSyncRange)* hsync; - unsigned char nvsync; - SDL_NAME(XF86VidModeSyncRange)* vsync; -} SDL_NAME(XF86VidModeMonitor); - -typedef struct { - int type; /* of event */ - unsigned long serial; /* # of last request processed by server */ - Bool send_event; /* true if this came from a SendEvent req */ - Display *display; /* Display the event was read from */ - Window root; /* root window of event screen */ - int state; /* What happened */ - int kind; /* What happened */ - Bool forced; /* extents of new region */ - Time time; /* event timestamp */ -} SDL_NAME(XF86VidModeNotifyEvent); - -typedef struct { - float red; /* Red Gamma value */ - float green; /* Green Gamma value */ - float blue; /* Blue Gamma value */ -} SDL_NAME(XF86VidModeGamma); - - -#define SDL_XF86VidModeSelectNextMode(disp, scr) \ - SDL_NAME(XF86VidModeSwitchMode)(disp, scr, 1) -#define SDL_XF86VidModeSelectPrevMode(disp, scr) \ - SDL_NAME(XF86VidModeSwitchMode)(disp, scr, -1) - -_XFUNCPROTOBEGIN - -Bool SDL_NAME(XF86VidModeQueryVersion)( - Display* /* dpy */, - int* /* majorVersion */, - int* /* minorVersion */ -); - -Bool SDL_NAME(XF86VidModeQueryExtension)( - Display* /* dpy */, - int* /* event_base */, - int* /* error_base */ -); - -Bool SDL_NAME(XF86VidModeSetClientVersion)( - Display* /* dpy */ -); - -Bool SDL_NAME(XF86VidModeGetModeLine)( - Display* /* dpy */, - int /* screen */, - int* /* dotclock */, - SDL_NAME(XF86VidModeModeLine)* /* modeline */ -); - -Bool SDL_NAME(XF86VidModeGetAllModeLines)( - Display* /* dpy */, - int /* screen */, - int* /* modecount */, - SDL_NAME(XF86VidModeModeInfo)*** /* modelinesPtr */ -); - -Bool SDL_NAME(XF86VidModeAddModeLine)( - Display* /* dpy */, - int /* screen */, - SDL_NAME(XF86VidModeModeInfo)* /* new modeline */, - SDL_NAME(XF86VidModeModeInfo)* /* after modeline */ -); - -Bool SDL_NAME(XF86VidModeDeleteModeLine)( - Display* /* dpy */, - int /* screen */, - SDL_NAME(XF86VidModeModeInfo)* /* modeline */ -); - -Bool SDL_NAME(XF86VidModeModModeLine)( - Display* /* dpy */, - int /* screen */, - SDL_NAME(XF86VidModeModeLine)* /* modeline */ -); - -Status SDL_NAME(XF86VidModeValidateModeLine)( - Display* /* dpy */, - int /* screen */, - SDL_NAME(XF86VidModeModeInfo)* /* modeline */ -); - -Bool SDL_NAME(XF86VidModeSwitchMode)( - Display* /* dpy */, - int /* screen */, - int /* zoom */ -); - -Bool SDL_NAME(XF86VidModeSwitchToMode)( - Display* /* dpy */, - int /* screen */, - SDL_NAME(XF86VidModeModeInfo)* /* modeline */ -); - -Bool SDL_NAME(XF86VidModeLockModeSwitch)( - Display* /* dpy */, - int /* screen */, - int /* lock */ -); - -Bool SDL_NAME(XF86VidModeGetMonitor)( - Display* /* dpy */, - int /* screen */, - SDL_NAME(XF86VidModeMonitor)* /* monitor */ -); - -Bool SDL_NAME(XF86VidModeGetViewPort)( - Display* /* dpy */, - int /* screen */, - int* /* x return */, - int* /* y return */ -); - -Bool SDL_NAME(XF86VidModeSetViewPort)( - Display* /* dpy */, - int /* screen */, - int /* x */, - int /* y */ -); - -Bool SDL_NAME(XF86VidModeGetDotClocks)( - Display* /* dpy */, - int /* screen */, - int* /* flags return */, - int* /* number of clocks return */, - int* /* max dot clock return */, - int** /* clocks return */ -); - -Bool SDL_NAME(XF86VidModeGetGamma)( - Display* /* dpy */, - int /* screen */, - SDL_NAME(XF86VidModeGamma)* /* Gamma */ -); - -Bool SDL_NAME(XF86VidModeSetGamma)( - Display* /* dpy */, - int /* screen */, - SDL_NAME(XF86VidModeGamma)* /* Gamma */ -); - -Bool SDL_NAME(XF86VidModeSetGammaRamp)( - Display* /* dpy */, - int /* screen */, - int /* size */, - unsigned short* /* red array */, - unsigned short* /* green array */, - unsigned short* /* blue array */ -); - -Bool SDL_NAME(XF86VidModeGetGammaRamp)( - Display* /* dpy */, - int /* screen */, - int /* size */, - unsigned short* /* red array */, - unsigned short* /* green array */, - unsigned short* /* blue array */ -); - -Bool SDL_NAME(XF86VidModeGetGammaRampSize)( - Display* /* dpy */, - int /* screen */, - int* /* size */ -); - - -_XFUNCPROTOEND - -#endif - -#endif diff --git a/apps/plugins/sdl/src/video/Xext/extensions/xf86vmstr.h b/apps/plugins/sdl/src/video/Xext/extensions/xf86vmstr.h deleted file mode 100644 index 0c3078d5aa..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/xf86vmstr.h +++ /dev/null @@ -1,546 +0,0 @@ -/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.27 2001/08/01 00:44:36 tsi Exp $ */ -/* - -Copyright 1995 Kaleb S. KEITHLEY - -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 Kaleb S. KEITHLEY 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 Kaleb S. KEITHLEY -shall not be used in advertising or otherwise to promote the sale, use -or other dealings in this Software without prior written authorization -from Kaleb S. KEITHLEY - -*/ -/* $Xorg: xf86vmstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */ - -/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ - -#ifndef _XF86VIDMODESTR_H_ -#define _XF86VIDMODESTR_H_ - -#include "xf86vmode.h" - -#define XF86VIDMODENAME "XFree86-VidModeExtension" - -#define XF86VIDMODE_MAJOR_VERSION 2 /* current version numbers */ -#define XF86VIDMODE_MINOR_VERSION 1 -/* - * major version 0 == uses parameter-to-wire functions in XFree86 libXxf86vm. - * major version 1 == uses parameter-to-wire functions hard-coded in xvidtune - * client. - * major version 2 == uses new protocol version in XFree86 4.0. - */ - -typedef struct _XF86VidModeQueryVersion { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeQueryVersion */ - CARD16 length B16; -} xXF86VidModeQueryVersionReq; -#define sz_xXF86VidModeQueryVersionReq 4 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 majorVersion B16; /* major version of XF86VidMode */ - CARD16 minorVersion B16; /* minor version of XF86VidMode */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeQueryVersionReply; -#define sz_xXF86VidModeQueryVersionReply 32 - -typedef struct _XF86VidModeGetModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86VidModeGetModeLineReq, - xXF86VidModeGetAllModeLinesReq, - xXF86VidModeGetMonitorReq, - xXF86VidModeGetViewPortReq, - xXF86VidModeGetDotClocksReq; -#define sz_xXF86VidModeGetModeLineReq 8 -#define sz_xXF86VidModeGetAllModeLinesReq 8 -#define sz_xXF86VidModeGetMonitorReq 8 -#define sz_xXF86VidModeGetViewPortReq 8 -#define sz_xXF86VidModeGetDotClocksReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad2 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeGetModeLineReply; -#define sz_xXF86VidModeGetModeLineReply 52 - -/* 0.x version */ -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeGetModeLineReply; -#define sz_xXF86OldVidModeGetModeLineReply 36 - -typedef struct { - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD32 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeModeInfo; - -/* 0.x version */ -typedef struct { - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeModeInfo; - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 modecount B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeGetAllModeLinesReply; -#define sz_xXF86VidModeGetAllModeLinesReply 32 - -typedef struct _XF86VidModeAddModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; - CARD32 after_dotclock B32; - CARD16 after_hdisplay B16; - CARD16 after_hsyncstart B16; - CARD16 after_hsyncend B16; - CARD16 after_htotal B16; - CARD16 after_hskew B16; - CARD16 after_vdisplay B16; - CARD16 after_vsyncstart B16; - CARD16 after_vsyncend B16; - CARD16 after_vtotal B16; - CARD16 pad2 B16; - CARD32 after_flags B32; - CARD32 reserved4 B32; - CARD32 reserved5 B32; - CARD32 reserved6 B32; -} xXF86VidModeAddModeLineReq; -#define sz_xXF86VidModeAddModeLineReq 92 - -/* 0.x version */ -typedef struct _XF86OldVidModeAddModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; - CARD32 after_dotclock B32; - CARD16 after_hdisplay B16; - CARD16 after_hsyncstart B16; - CARD16 after_hsyncend B16; - CARD16 after_htotal B16; - CARD16 after_vdisplay B16; - CARD16 after_vsyncstart B16; - CARD16 after_vsyncend B16; - CARD16 after_vtotal B16; - CARD32 after_flags B32; -} xXF86OldVidModeAddModeLineReq; -#define sz_xXF86OldVidModeAddModeLineReq 60 - -typedef struct _XF86VidModeModModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeModModeLine */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeModModeLineReq; -#define sz_xXF86VidModeModModeLineReq 48 - -/* 0.x version */ -typedef struct _XF86OldVidModeModModeLine { - CARD8 reqType; /* always XF86OldVidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86OldVidModeModModeLine */ - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeModModeLineReq; -#define sz_xXF86OldVidModeModModeLineReq 32 - -typedef struct _XF86VidModeValidateModeLine { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 hskew B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD16 pad1 B16; - CARD32 flags B32; - CARD32 reserved1 B32; - CARD32 reserved2 B32; - CARD32 reserved3 B32; - CARD32 privsize B32; -} xXF86VidModeDeleteModeLineReq, - xXF86VidModeValidateModeLineReq, - xXF86VidModeSwitchToModeReq; -#define sz_xXF86VidModeDeleteModeLineReq 52 -#define sz_xXF86VidModeValidateModeLineReq 52 -#define sz_xXF86VidModeSwitchToModeReq 52 - -/* 0.x version */ -typedef struct _XF86OldVidModeValidateModeLine { - CARD8 reqType; /* always XF86OldVidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD32 screen B32; /* could be CARD16 but need the pad */ - CARD32 dotclock B32; - CARD16 hdisplay B16; - CARD16 hsyncstart B16; - CARD16 hsyncend B16; - CARD16 htotal B16; - CARD16 vdisplay B16; - CARD16 vsyncstart B16; - CARD16 vsyncend B16; - CARD16 vtotal B16; - CARD32 flags B32; - CARD32 privsize B32; -} xXF86OldVidModeDeleteModeLineReq, - xXF86OldVidModeValidateModeLineReq, - xXF86OldVidModeSwitchToModeReq; -#define sz_xXF86OldVidModeDeleteModeLineReq 36 -#define sz_xXF86OldVidModeValidateModeLineReq 36 -#define sz_xXF86OldVidModeSwitchToModeReq 36 - -typedef struct _XF86VidModeSwitchMode { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSwitchMode */ - CARD16 length B16; - CARD16 screen B16; - CARD16 zoom B16; -} xXF86VidModeSwitchModeReq; -#define sz_xXF86VidModeSwitchModeReq 8 - -typedef struct _XF86VidModeLockModeSwitch { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeLockModeSwitch */ - CARD16 length B16; - CARD16 screen B16; - CARD16 lock B16; -} xXF86VidModeLockModeSwitchReq; -#define sz_xXF86VidModeLockModeSwitchReq 8 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 status B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeValidateModeLineReply; -#define sz_xXF86VidModeValidateModeLineReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD8 vendorLength; - CARD8 modelLength; - CARD8 nhsync; - CARD8 nvsync; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeGetMonitorReply; -#define sz_xXF86VidModeGetMonitorReply 32 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 x B32; - CARD32 y B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetViewPortReply; -#define sz_xXF86VidModeGetViewPortReply 32 - -typedef struct _XF86VidModeSetViewPort { - CARD8 reqType; /* always VidModeReqCode */ - CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSetViewPort */ - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 x B32; - CARD32 y B32; -} xXF86VidModeSetViewPortReq; -#define sz_xXF86VidModeSetViewPortReq 16 - -typedef struct { - BYTE type; - BOOL pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 flags B32; - CARD32 clocks B32; - CARD32 maxclocks B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xXF86VidModeGetDotClocksReply; -#define sz_xXF86VidModeGetDotClocksReply 32 - -typedef struct _XF86VidModeSetClientVersion { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 major B16; - CARD16 minor B16; -} xXF86VidModeSetClientVersionReq; -#define sz_xXF86VidModeSetClientVersionReq 8 - -typedef struct _XF86VidModeGetGamma { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xXF86VidModeGetGammaReq; -#define sz_xXF86VidModeGetGammaReq 32 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 red B32; - CARD32 green B32; - CARD32 blue B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xXF86VidModeGetGammaReply; -#define sz_xXF86VidModeGetGammaReply 32 - -typedef struct _XF86VidModeSetGamma { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; - CARD32 red B32; - CARD32 green B32; - CARD32 blue B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; -} xXF86VidModeSetGammaReq; -#define sz_xXF86VidModeSetGammaReq 32 - - -typedef struct _XF86VidModeSetGammaRamp { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 size B16; -} xXF86VidModeSetGammaRampReq; -#define sz_xXF86VidModeSetGammaRampReq 8 - -typedef struct _XF86VidModeGetGammaRamp { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 size B16; -} xXF86VidModeGetGammaRampReq; -#define sz_xXF86VidModeGetGammaRampReq 8 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 size B16; - CARD16 pad0 B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetGammaRampReply; -#define sz_xXF86VidModeGetGammaRampReply 32 - -typedef struct _XF86VidModeGetGammaRampSize { - CARD8 reqType; /* always XF86VidModeReqCode */ - CARD8 xf86vidmodeReqType; - CARD16 length B16; - CARD16 screen B16; - CARD16 pad B16; -} xXF86VidModeGetGammaRampSizeReq; -#define sz_xXF86VidModeGetGammaRampSizeReq 8 - -typedef struct { - BYTE type; - BOOL pad; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD16 size B16; - CARD16 pad0 B16; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; -} xXF86VidModeGetGammaRampSizeReply; -#define sz_xXF86VidModeGetGammaRampSizeReply 32 - - -#endif /* _XF86VIDMODESTR_H_ */ - diff --git a/apps/plugins/sdl/src/video/Xext/extensions/xme.h b/apps/plugins/sdl/src/video/Xext/extensions/xme.h deleted file mode 100644 index f550623c9f..0000000000 --- a/apps/plugins/sdl/src/video/Xext/extensions/xme.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 1993-2001 by Xi Graphics, Inc. - * All Rights Reserved. - * - * Please see the LICENSE file accompanying this distribution for licensing - * information. - * - * Please send any bug fixes and modifications to src@xig.com. - * - * $XiGId: xme.h,v 1.1.1.1 2001/11/19 19:01:10 jon Exp $ - * - */ - - -#ifndef _XME_H_INCLUDED -#define _XME_H_INCLUDED - -typedef struct { - short x; - short y; - unsigned short w; - unsigned short h; -} XiGMiscViewInfo; - -typedef struct { - unsigned short width; - unsigned short height; - int refresh; -} XiGMiscResolutionInfo; - -extern Bool XiGMiscQueryVersion(Display *dpy, int *major, int *minor); -extern int XiGMiscQueryViews(Display *dpy, int screen, - XiGMiscViewInfo **pviews); -extern int XiGMiscQueryResolutions(Display *dpy, int screen, int view, - int *pactive, - XiGMiscResolutionInfo **presolutions); -extern void XiGMiscChangeResolution(Display *dpy, int screen, int view, - int width, int height, int refresh); - -/* SDL addition from Ryan: free memory used by xme. */ -extern void XiGMiscDestroy(void); - -#endif /* _XME_H_INCLUDED */ - - diff --git a/apps/plugins/sdl/src/video/aalib/SDL_aaevents.c b/apps/plugins/sdl/src/video/aalib/SDL_aaevents.c deleted file mode 100644 index a26ab2d0e1..0000000000 --- a/apps/plugins/sdl/src/video/aalib/SDL_aaevents.c +++ /dev/null @@ -1,202 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ -#include "SDL_config.h" - -/* Handle the event stream, converting AA events into SDL events */ - -#include - -#include - -#include "SDL.h" -#include "../../events/SDL_sysevents.h" -#include "../../events/SDL_events_c.h" -#include "SDL_aavideo.h" -#include "SDL_aaevents_c.h" - -/* The translation tables from a console scancode to a SDL keysym */ -static SDLKey keymap[401]; - -static SDL_keysym *TranslateKey(int scancode, SDL_keysym *keysym); - - -void AA_PumpEvents(_THIS) -{ - int posted = 0; - int mouse_button, mouse_x, mouse_y; - int evt; - SDL_keysym keysym; - - static int prev_button = -1, prev_x = -1, prev_y = -1; - - if( ! this->screen ) /* Wait till we got the screen initialized */ - return; - - do { - posted = 0; - /* Gather events */ - - /* Get mouse status */ - SDL_mutexP(AA_mutex); - aa_getmouse (AA_context, &mouse_x, &mouse_y, &mouse_button); - SDL_mutexV(AA_mutex); - mouse_x = mouse_x * this->screen->w / aa_scrwidth (AA_context); - mouse_y = mouse_y * this->screen->h / aa_scrheight (AA_context); - - /* Compare against previous state and generate events */ - if( prev_button != mouse_button ) { - if( mouse_button & AA_BUTTON1 ) { - if ( ! (prev_button & AA_BUTTON1) ) { - posted += SDL_PrivateMouseButton(SDL_PRESSED, 1, 0, 0); - } - } else { - if ( prev_button & AA_BUTTON1 ) { - posted += SDL_PrivateMouseButton(SDL_RELEASED, 1, 0, 0); - } - } - if( mouse_button & AA_BUTTON2 ) { - if ( ! (prev_button & AA_BUTTON2) ) { - posted += SDL_PrivateMouseButton(SDL_PRESSED, 2, 0, 0); - } - } else { - if ( prev_button & AA_BUTTON2 ) { - posted += SDL_PrivateMouseButton(SDL_RELEASED, 2, 0, 0); - } - } - if( mouse_button & AA_BUTTON3 ) { - if ( ! (prev_button & AA_BUTTON3) ) { - posted += SDL_PrivateMouseButton(SDL_PRESSED, 3, 0, 0); - } - } else { - if ( prev_button & AA_BUTTON3 ) { - posted += SDL_PrivateMouseButton(SDL_RELEASED, 3, 0, 0); - } - } - } - if ( prev_x != mouse_x || prev_y != mouse_y ) { - posted += SDL_PrivateMouseMotion(0, 0, mouse_x, mouse_y); - } - - prev_button = mouse_button; - prev_x = mouse_x; prev_y = mouse_y; - - /* Get keyboard event */ - SDL_mutexP(AA_mutex); - evt = aa_getevent(AA_context, 0); - SDL_mutexV(AA_mutex); - if ( (evt > AA_NONE) && (evt < AA_RELEASE) && (evt != AA_MOUSE) && (evt != AA_RESIZE) ) { - /* Key pressed */ -/* printf("Key pressed: %d (%c)\n", evt, evt); */ - posted += SDL_PrivateKeyboard(SDL_PRESSED, TranslateKey(evt, &keysym)); - } else if ( evt >= AA_RELEASE ) { - /* Key released */ - evt &= ~AA_RELEASE; -/* printf("Key released: %d (%c)\n", evt, evt); */ - posted += SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(evt, &keysym)); - } - } while ( posted ); -} - -void AA_InitOSKeymap(_THIS) -{ - int i; - static const char *std_keys = " 01234567890&#'()_-|$*+-=/\\:;.,!?<>{}[]@~%^\x9"; - const char *std; - - /* Initialize the AAlib key translation table */ - for ( i=0; i= SDL_arraysize(keymap) ) - scancode = AA_UNKNOWN; - - /* Set the keysym information */ - keysym->scancode = scancode; - keysym->sym = keymap[scancode]; - keysym->mod = KMOD_NONE; - - /* If UNICODE is on, get the UNICODE value for the key */ - keysym->unicode = 0; - if ( SDL_TranslateUNICODE ) { - /* Populate the unicode field with the ASCII value */ - keysym->unicode = scancode; - } - return(keysym); -} diff --git a/apps/plugins/sdl/src/video/aalib/SDL_aaevents_c.h b/apps/plugins/sdl/src/video/aalib/SDL_aaevents_c.h deleted file mode 100644 index 6dbc9f691f..0000000000 --- a/apps/plugins/sdl/src/video/aalib/SDL_aaevents_c.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ -#include "SDL_config.h" - -#include "SDL_aavideo.h" - -/* Variables and functions exported by SDL_sysevents.c to other parts - of the native video subsystem (SDL_sysvideo.c) -*/ -extern void AA_initkeymaps(int fd); -extern void AA_mousecallback(int button, int dx, int dy, - int u1,int u2,int u3, int u4); -extern void AA_keyboardcallback(int scancode, int pressed); - -extern void AA_InitOSKeymap(_THIS); -extern void AA_PumpEvents(_THIS); diff --git a/apps/plugins/sdl/src/video/aalib/SDL_aamouse.c b/apps/plugins/sdl/src/video/aalib/SDL_aamouse.c deleted file mode 100644 index dc784a56f9..0000000000 --- a/apps/plugins/sdl/src/video/aalib/SDL_aamouse.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ -#include "SDL_config.h" - -#include - -#include "SDL_mouse.h" -#include "../../events/SDL_events_c.h" - -#include "SDL_aamouse_c.h" - - -/* The implementation dependent data for the window manager cursor */ -struct WMcursor { - int unused; -}; diff --git a/apps/plugins/sdl/src/video/aalib/SDL_aamouse_c.h b/apps/plugins/sdl/src/video/aalib/SDL_aamouse_c.h deleted file mode 100644 index 6ce3d9863b..0000000000 --- a/apps/plugins/sdl/src/video/aalib/SDL_aamouse_c.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ -#include "SDL_config.h" - -#include "SDL_aavideo.h" - -/* Functions to be exported */ diff --git a/apps/plugins/sdl/src/video/aalib/SDL_aavideo.c b/apps/plugins/sdl/src/video/aalib/SDL_aavideo.c deleted file mode 100644 index e6d5d3e4ce..0000000000 --- a/apps/plugins/sdl/src/video/aalib/SDL_aavideo.c +++ /dev/null @@ -1,388 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ -#include "SDL_config.h" - -/* AAlib based SDL video driver implementation. -*/ - -#include -#include - - -#include "SDL_video.h" -#include "SDL_mouse.h" -#include "../SDL_sysvideo.h" -#include "../SDL_pixels_c.h" -#include "../../events/SDL_events_c.h" - -#include "SDL_aavideo.h" -#include "SDL_aaevents_c.h" -#include "SDL_aamouse_c.h" - -#include - -/* Initialization/Query functions */ -static int AA_VideoInit(_THIS, SDL_PixelFormat *vformat); -static SDL_Rect **AA_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags); -static SDL_Surface *AA_SetVideoMode(_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags); -static int AA_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors); -static void AA_VideoQuit(_THIS); - -/* Hardware surface functions */ -static int AA_AllocHWSurface(_THIS, SDL_Surface *surface); -static int AA_LockHWSurface(_THIS, SDL_Surface *surface); -static int AA_FlipHWSurface(_THIS, SDL_Surface *surface); -static void AA_UnlockHWSurface(_THIS, SDL_Surface *surface); -static void AA_FreeHWSurface(_THIS, SDL_Surface *surface); - -/* Cache the VideoDevice struct */ -static struct SDL_VideoDevice *local_this; - -/* AAlib driver bootstrap functions */ - -static int AA_Available(void) -{ - return 1; /* Always available ! */ -} - -static void AA_DeleteDevice(SDL_VideoDevice *device) -{ - SDL_free(device->hidden); - SDL_free(device); -} - -static SDL_VideoDevice *AA_CreateDevice(int devindex) -{ - SDL_VideoDevice *device; - - /* Initialize all variables that we clean on shutdown */ - device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice)); - if ( device ) { - SDL_memset(device, 0, (sizeof *device)); - device->hidden = (struct SDL_PrivateVideoData *) - SDL_malloc((sizeof *device->hidden)); - } - if ( (device == NULL) || (device->hidden == NULL) ) { - SDL_OutOfMemory(); - if ( device ) { - SDL_free(device); - } - return(0); - } - SDL_memset(device->hidden, 0, (sizeof *device->hidden)); - - /* Set the function pointers */ - device->VideoInit = AA_VideoInit; - device->ListModes = AA_ListModes; - device->SetVideoMode = AA_SetVideoMode; - device->CreateYUVOverlay = NULL; - device->SetColors = AA_SetColors; - device->UpdateRects = NULL; - device->VideoQuit = AA_VideoQuit; - device->AllocHWSurface = AA_AllocHWSurface; - device->CheckHWBlit = NULL; - device->FillHWRect = NULL; - device->SetHWColorKey = NULL; - device->SetHWAlpha = NULL; - device->LockHWSurface = AA_LockHWSurface; - device->UnlockHWSurface = AA_UnlockHWSurface; - device->FlipHWSurface = NULL; - device->FreeHWSurface = AA_FreeHWSurface; - device->SetCaption = NULL; - device->SetIcon = NULL; - device->IconifyWindow = NULL; - device->GrabInput = NULL; - device->GetWMInfo = NULL; - device->InitOSKeymap = AA_InitOSKeymap; - device->PumpEvents = AA_PumpEvents; - - device->free = AA_DeleteDevice; - - return device; -} - -VideoBootStrap AALIB_bootstrap = { - "aalib", "ASCII Art Library", - AA_Available, AA_CreateDevice -}; - -static void AA_ResizeHandler(aa_context *); - -int AA_VideoInit(_THIS, SDL_PixelFormat *vformat) -{ - int keyboard; - int i; - - /* Initialize all variables that we clean on shutdown */ - for ( i=0; ix = SDL_modelist[i]->y = 0; - } - /* Modes sorted largest to smallest */ - SDL_modelist[0]->w = 1024; SDL_modelist[0]->h = 768; - SDL_modelist[1]->w = 800; SDL_modelist[1]->h = 600; - SDL_modelist[2]->w = 640; SDL_modelist[2]->h = 480; - SDL_modelist[3]->w = 320; SDL_modelist[3]->h = 400; - SDL_modelist[4]->w = 320; SDL_modelist[4]->h = 240; - SDL_modelist[5]->w = 320; SDL_modelist[5]->h = 200; - SDL_modelist[6] = NULL; - - /* Initialize the library */ - - AA_mutex = SDL_CreateMutex(); - - aa_parseoptions (NULL, NULL, NULL, NULL); - - AA_context = aa_autoinit(&aa_defparams); - if ( ! AA_context ) { - SDL_SetError("Unable to initialize AAlib"); - return(-1); - } - - /* Enable mouse and keyboard support */ - - if ( ! aa_autoinitkbd (AA_context, AA_SENDRELEASE) ) { - SDL_SetError("Unable to initialize AAlib keyboard"); - return(-1); - } - if ( ! aa_autoinitmouse (AA_context, AA_SENDRELEASE) ) { - fprintf(stderr,"Warning: Unable to initialize AAlib mouse"); - } - AA_rparams = aa_getrenderparams(); - - local_this = this; - - aa_resizehandler(AA_context, AA_ResizeHandler); - - fprintf(stderr,"Using AAlib driver: %s (%s)\n", AA_context->driver->name, AA_context->driver->shortname); - - AA_in_x11 = (SDL_strcmp(AA_context->driver->shortname,"X11") == 0); - /* Determine the screen depth (use default 8-bit depth) */ - vformat->BitsPerPixel = 8; - vformat->BytesPerPixel = 1; - - /* We're done! */ - return(0); -} - -SDL_Rect **AA_ListModes(_THIS, SDL_PixelFormat *format, Uint32 flags) -{ - if(format->BitsPerPixel != 8) - return NULL; - - if ( flags & SDL_FULLSCREEN ) { - return SDL_modelist; - } else { - return (SDL_Rect **) -1; - } -} - -/* From aavga.c - AAlib does not give us the choice of the actual resolution, thus we have to simulate additional - resolution by scaling down manually each frame -*/ -static void fastscale (register char *b1, register char *b2, int x1, int x2, int y1, int y2) -{ - register int ex, spx = 0, ddx, ddx1; - int ddy1, ddy, spy = 0, ey; - int x; - char *bb1 = b1; - if (!x1 || !x2 || !y1 || !y2) - return; - ddx = x1 + x1; - ddx1 = x2 + x2; - if (ddx1 < ddx) - spx = ddx / ddx1, ddx %= ddx1; - ddy = y1 + y1; - ddy1 = y2 + y2; - if (ddy1 < ddy) - spy = (ddy / ddy1) * x1, ddy %= ddy1; - ey = -ddy1; - for (; y2; y2--) { - ex = -ddx1; - for (x = x2; x; x--) { - *b2 = *b1; - b2++; - b1 += spx; - ex += ddx; - if (ex > 0) { - b1++; - ex -= ddx1; - } - } - bb1 += spy; - ey += ddy; - if (ey > 0) { - bb1 += x1; - ey -= ddy1; - } - b1 = bb1; - } -} - -/* Various screen update functions available */ -static void AA_DirectUpdate(_THIS, int numrects, SDL_Rect *rects); - -SDL_Surface *AA_SetVideoMode(_THIS, SDL_Surface *current, - int width, int height, int bpp, Uint32 flags) -{ - int mode; - - if ( AA_buffer ) { - SDL_free( AA_buffer ); - } - - AA_buffer = SDL_malloc(width * height); - if ( ! AA_buffer ) { - SDL_SetError("Couldn't allocate buffer for requested mode"); - return(NULL); - } - -/* printf("Setting mode %dx%d\n", width, height); */ - - SDL_memset(aa_image(AA_context), 0, aa_imgwidth(AA_context) * aa_imgheight(AA_context)); - SDL_memset(AA_buffer, 0, width * height); - - /* Allocate the new pixel format for the screen */ - if ( ! SDL_ReallocFormat(current, 8, 0, 0, 0, 0) ) { - return(NULL); - } - - /* Set up the new mode framebuffer */ - current->flags = SDL_FULLSCREEN; - AA_w = current->w = width; - AA_h = current->h = height; - current->pitch = current->w; - current->pixels = AA_buffer; - - AA_x_ratio = ((double)aa_imgwidth(AA_context)) / ((double)width); - AA_y_ratio = ((double)aa_imgheight(AA_context)) / ((double)height); - - /* Set the blit function */ - this->UpdateRects = AA_DirectUpdate; - - /* We're done */ - return(current); -} - -static void AA_ResizeHandler(aa_context *context) -{ - aa_resize(context); - local_this->hidden->x_ratio = ((double)aa_imgwidth(context)) / ((double)local_this->screen->w); - local_this->hidden->y_ratio = ((double)aa_imgheight(context)) / ((double)local_this->screen->h); - - fastscale (local_this->hidden->buffer, aa_image(context), local_this->hidden->w, aa_imgwidth (context), local_this->hidden->h, aa_imgheight (context)); - aa_renderpalette(context, local_this->hidden->palette, local_this->hidden->rparams, 0, 0, aa_scrwidth(context), aa_scrheight(context)); - aa_flush(context); -} - -/* We don't actually allow hardware surfaces other than the main one */ -static int AA_AllocHWSurface(_THIS, SDL_Surface *surface) -{ - return(-1); -} -static void AA_FreeHWSurface(_THIS, SDL_Surface *surface) -{ - return; -} - -/* We need to wait for vertical retrace on page flipped displays */ -static int AA_LockHWSurface(_THIS, SDL_Surface *surface) -{ - /* TODO ? */ - return(0); -} -static void AA_UnlockHWSurface(_THIS, SDL_Surface *surface) -{ - return; -} - -/* FIXME: How is this done with AAlib? */ -static int AA_FlipHWSurface(_THIS, SDL_Surface *surface) -{ - SDL_mutexP(AA_mutex); - aa_flush(AA_context); - SDL_mutexV(AA_mutex); - return(0); -} - -static void AA_DirectUpdate(_THIS, int numrects, SDL_Rect *rects) -{ - int i; - SDL_Rect *rect; - - fastscale (AA_buffer, aa_image(AA_context), AA_w, aa_imgwidth (AA_context), AA_h, aa_imgheight (AA_context)); -#if 1 - aa_renderpalette(AA_context, AA_palette, AA_rparams, 0, 0, aa_scrwidth(AA_context), aa_scrheight(AA_context)); -#else - /* Render only the rectangles in the list */ - printf("Update rects : "); - for ( i=0; i < numrects; ++i ) { - rect = &rects[i]; - printf("(%d,%d-%d,%d)", rect->x, rect->y, rect->w, rect->h); - aa_renderpalette(AA_context, AA_palette, AA_rparams, rect->x * AA_x_ratio, rect->y * AA_y_ratio, rect->w * AA_x_ratio, rect->h * AA_y_ratio); - } - printf("\n"); -#endif - SDL_mutexP(AA_mutex); - aa_flush(AA_context); - SDL_mutexV(AA_mutex); - return; -} - -int AA_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors) -{ - int i; - - for ( i=0; i < ncolors; i++ ) { - aa_setpalette(AA_palette, firstcolor + i, - colors[i].r>>2, - colors[i].g>>2, - colors[i].b>>2); - } - return(1); -} - -/* Note: If we are terminated, this could be called in the middle of - another SDL video routine -- notably UpdateRects. -*/ -void AA_VideoQuit(_THIS) -{ - int i; - - aa_uninitkbd(AA_context); - aa_uninitmouse(AA_context); - - /* Free video mode lists */ - for ( i=0; iscreen->pixels = NULL; -} diff --git a/apps/plugins/sdl/src/video/aalib/SDL_aavideo.h b/apps/plugins/sdl/src/video/aalib/SDL_aavideo.h deleted file mode 100644 index 987edc9768..0000000000 --- a/apps/plugins/sdl/src/video/aalib/SDL_aavideo.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ -#include "SDL_config.h" - -#ifndef _SDL_aavideo_h -#define _SDL_aavideo_h - -#include "SDL_mouse.h" -#include "SDL_mutex.h" -#include "../SDL_sysvideo.h" - -#include - -/* Hidden "this" pointer for the video functions */ -#define _THIS SDL_VideoDevice *this - -#define SDL_NUMMODES 6 - -/* Private display data */ -struct SDL_PrivateVideoData { - SDL_Rect *SDL_modelist[SDL_NUMMODES+1]; - aa_context *context; - aa_palette palette; - aa_renderparams *rparams; - double x_ratio, y_ratio; - int w, h; - SDL_mutex *mutex; - int in_x11; - void *buffer; -}; - -/* Old variable names */ -#define SDL_modelist (this->hidden->SDL_modelist) -#define AA_context (this->hidden->context) -#define AA_palette (this->hidden->palette) -#define AA_rparams (this->hidden->rparams) -#define AA_buffer (this->hidden->buffer) - -#define AA_x_ratio (this->hidden->x_ratio) -#define AA_y_ratio (this->hidden->y_ratio) - -#define AA_mutex (this->hidden->mutex) -#define AA_in_x11 (this->hidden->in_x11) -#define AA_w (this->hidden->w) -#define AA_h (this->hidden->h) - -#endif /* _SDL_aavideo_h */ diff --git a/apps/plugins/sdl/src/video/ataricommon/SDL_ataric2p.S b/apps/plugins/sdl/src/video/ataricommon/SDL_ataric2p.S deleted file mode 100644 index 3cd1961b85..0000000000 --- a/apps/plugins/sdl/src/video/ataricommon/SDL_ataric2p.S +++ /dev/null @@ -1,452 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ - -/* - Chunky to planar conversion routine - 1 byte/pixel -> 4 or 8 bit planes - - Patrice Mandin - Xavier Joubert - Mikael Kalms -*/ - - .globl _SDL_Atari_C2pConvert - .globl _SDL_Atari_C2pConvert8 - .globl _SDL_Atari_C2pConvert4 - .globl _SDL_Atari_C2pConvert4_pal - -/* ------------ Conversion C2P, 8 bits ------------ */ - - .text -_SDL_Atari_C2pConvert8: -#if !defined(__mcoldfire__) - movel sp@(4),c2p_source - movel sp@(8),c2p_dest - movel sp@(12),c2p_width - movel sp@(16),c2p_height - movel sp@(20),c2p_dblligne - movel sp@(24),c2p_srcpitch - movel sp@(28),c2p_dstpitch - - moveml d2-d7/a2-a6,sp@- - - movel c2p_source,c2p_cursrc - movel c2p_dest,c2p_curdst - movel #0x0f0f0f0f,d4 - movel #0x00ff00ff,d5 - movel #0x55555555,d6 - movew c2p_height+2,c2p_row - movew c2p_width+2,d0 - andw #-8,d0 - movew d0,c2p_rowlen - -SDL_Atari_C2p8_rowloop: - - movel c2p_cursrc,a0 - movel c2p_curdst,a1 - - movel a0,a2 - addw c2p_rowlen,a2 - - movel a0@+,d0 - movel a0@+,d1 - movel a0@+,d2 - movel a0@+,d3 -/* - d0 = a7a6a5a4a3a2a1a0 b7b6b5b4b3b2b1b0 c7c6c5c4c3c2c1c0 d7d6d5d4d3d2d1d0 - d1 = e7e6e5e4e3e2e1e0 f7f6f5f4f3f2f1f0 g7g6g5g4g3g2g1g0 h7h6h5h4h3h2h1h0 - d2 = i7i6i5i4i3i2i1i0 j7j6j5j4j3j2j1j0 k7k6k5k4k3k2k1k0 l7l6l5l4l3l2l1l0 - d3 = m7m6m5m4m3m2m1m0 n7n6n5n4n3n2n1n0 o7o6o5o4o3o2o1o0 p7p6p5p4p3p2p1p0 -*/ - movel d1,d7 - lsrl #4,d7 - eorl d0,d7 - andl d4,d7 - eorl d7,d0 - lsll #4,d7 - eorl d7,d1 - - movel d3,d7 - lsrl #4,d7 - eorl d2,d7 - andl d4,d7 - eorl d7,d2 - lsll #4,d7 - eorl d7,d3 - - movel d2,d7 - lsrl #8,d7 - eorl d0,d7 - andl d5,d7 - eorl d7,d0 - lsll #8,d7 - eorl d7,d2 - - movel d3,d7 - lsrl #8,d7 - eorl d1,d7 - andl d5,d7 - eorl d7,d1 - lsll #8,d7 - eorl d7,d3 -/* - d0 = a7a6a5a4e7e6e5e4 i7i6i5i4m7m6m5m4 c7c6c5c4g7g6g5g4 k7k6k5k4o7o6o5o4 - d1 = a3a2a1a0e3e2e1e0 i3i2i1i0m3m2m1m0 c3c2c1c0g3g2g1g0 k3k2k1k0o3o2o1o0 - d2 = b7b6b5b4f7f6f5f4 j7j6j5j4n7n6n5n4 d7d6d5d4h7h6h5h4 l7l6l5l4p7p6p5p4 - d3 = b3b2b1b0f3f2f1f0 j3j2j1j0n3n2n1n0 d3d2d1d0h3h2h1h0 l3l2l1l0p3p2p1p0 -*/ - bras SDL_Atari_C2p8_start - -SDL_Atari_C2p8_pix16: - - movel a0@+,d0 - movel a0@+,d1 - movel a0@+,d2 - movel a0@+,d3 -/* - d0 = a7a6a5a4a3a2a1a0 b7b6b5b4b3b2b1b0 c7c6c5c4c3c2c1c0 d7d6d5d4d3d2d1d0 - d1 = e7e6e5e4e3e2e1e0 f7f6f5f4f3f2f1f0 g7g6g5g4g3g2g1g0 h7h6h5h4h3h2h1h0 - d2 = i7i6i5i4i3i2i1i0 j7j6j5j4j3j2j1j0 k7k6k5k4k3k2k1k0 l7l6l5l4l3l2l1l0 - d3 = m7m6m5m4m3m2m1m0 n7n6n5n4n3n2n1n0 o7o6o5o4o3o2o1o0 p7p6p5p4p3p2p1p0 -*/ - movel d1,d7 - lsrl #4,d7 - movel a3,a1@+ - eorl d0,d7 - andl d4,d7 - eorl d7,d0 - lsll #4,d7 - eorl d7,d1 - - movel d3,d7 - lsrl #4,d7 - eorl d2,d7 - andl d4,d7 - eorl d7,d2 - movel a4,a1@+ - lsll #4,d7 - eorl d7,d3 - - movel d2,d7 - lsrl #8,d7 - eorl d0,d7 - andl d5,d7 - eorl d7,d0 - movel a5,a1@+ - lsll #8,d7 - eorl d7,d2 - - movel d3,d7 - lsrl #8,d7 - eorl d1,d7 - andl d5,d7 - eorl d7,d1 - movel a6,a1@+ - lsll #8,d7 - eorl d7,d3 -/* - d0 = a7a6a5a4e7e6e5e4 i7i6i5i4m7m6m5m4 c7c6c5c4g7g6g5g4 k7k6k5k4o7o6o5o4 - d1 = a3a2a1a0e3e2e1e0 i3i2i1i0m3m2m1m0 c3c2c1c0g3g2g1g0 k3k2k1k0o3o2o1o0 - d2 = b7b6b5b4f7f6f5f4 j7j6j5j4n7n6n5n4 d7d6d5d4h7h6h5h4 l7l6l5l4p7p6p5p4 - d3 = b3b2b1b0f3f2f1f0 j3j2j1j0n3n2n1n0 d3d2d1d0h3h2h1h0 l3l2l1l0p3p2p1p0 -*/ - -SDL_Atari_C2p8_start: - - movel d2,d7 - lsrl #1,d7 - eorl d0,d7 - andl d6,d7 - eorl d7,d0 - addl d7,d7 - eorl d7,d2 - - movel d3,d7 - lsrl #1,d7 - eorl d1,d7 - andl d6,d7 - eorl d7,d1 - addl d7,d7 - eorl d7,d3 -/* - d0 = a7b7a5b5e7f7e5f5 i7j7i5j5m7n7m5n5 c7d7c5d5g7h7g5h5 k7l7k5l5o7p7o5p5 - d1 = a3b3a1b1e3f3e1f1 i3j3i1j1m3n3m1n1 c3d3c1d1g3h3g1h1 k3l3k1l1o3p3o1p1 - d2 = a6b6a4b4e6f6e4f4 i6j6i4j4m6n6m4n4 c6d6c4d4g6h6g4h4 k6l6k4l4o6p6o4p4 - d3 = a2b2a0b0e2f2e0f0 i2j2i0j0m2n2m0n0 c2d2c0d0g2h2g0h0 k2l2k0l0o2p2o0p0 -*/ - movew d2,d7 - movew d0,d2 - swap d2 - movew d2,d0 - movew d7,d2 - - movew d3,d7 - movew d1,d3 - swap d3 - movew d3,d1 - movew d7,d3 -/* - d0 = a7b7a5b5e7f7e5f5 i7j7i5j5m7n7m5n5 a6b6a4b4e6f6e4f4 i6j6i4j4m6n6m4n4 - d1 = a3b3a1b1e3f3e1f1 i3j3i1j1m3n3m1n1 a2b2a0b0e2f2e0f0 i2j2i0j0m2n2m0n0 - d2 = c7d7c5d5g7h7g5h5 k7l7k5l5o7p7o5p5 c6d6c4d4g6h6g4h4 k6l6k4l4o6p6o4p4 - d3 = c3d3c1d1g3h3g1h1 k3l3k1l1o3p3o1p1 c2d2c0d0g2h2g0h0 k2l2k0l0o2p2o0p0 -*/ - movel d2,d7 - lsrl #2,d7 - eorl d0,d7 - andl #0x33333333,d7 - eorl d7,d0 - lsll #2,d7 - eorl d7,d2 - - movel d3,d7 - lsrl #2,d7 - eorl d1,d7 - andl #0x33333333,d7 - eorl d7,d1 - lsll #2,d7 - eorl d7,d3 -/* - d0 = a7b7c7d7e7f7g7h7 i7j7k7l7m7n7o7p7 a6b6c6d6e6f6g6h6 i6j6k6l6m6n6o6p6 - d1 = a3b3c3d3e3f3g3h3 i3j3k3l3m3n3o3p3 a2b2c2d2e2f2g2h2 i2j2k2l2m2n2o2p2 - d2 = a5b5c5d5e5f5g5h5 i5j5k5l5m5n5o5p5 a4b4c4d4e4f4g4h4 i4j4k4l4m4n4o4p4 - d3 = a1b1c1d1e1f1g1h1 i1j1k1l1m1n1o1p1 a0b0c0d0e0f0g0h0 i0j0k0l0m0n0o0p0 -*/ - swap d0 - swap d1 - swap d2 - swap d3 - - movel d0,a6 - movel d2,a5 - movel d1,a4 - movel d3,a3 - - cmpl a0,a2 - bgt SDL_Atari_C2p8_pix16 - - movel a3,a1@+ - movel a4,a1@+ - movel a5,a1@+ - movel a6,a1@+ - - /* Double the line ? */ - - movel c2p_srcpitch,d0 - movel c2p_dstpitch,d1 - - tstl c2p_dblligne - beqs SDL_Atari_C2p8_nodblline - - movel c2p_curdst,a0 - movel a0,a1 - addl d1,a1 - - movew c2p_width+2,d7 - lsrw #4,d7 - subql #1,d7 -SDL_Atari_C2p8_dblloop: - movel a0@+,a1@+ - movel a0@+,a1@+ - movel a0@+,a1@+ - movel a0@+,a1@+ - dbra d7,SDL_Atari_C2p8_dblloop - - addl d1,c2p_curdst - -SDL_Atari_C2p8_nodblline: - - /* Next line */ - - addl d0,c2p_cursrc - addl d1,c2p_curdst - - subqw #1,c2p_row - bne SDL_Atari_C2p8_rowloop - - moveml sp@+,d2-d7/a2-a6 -#endif - rts - -/* ------------ Conversion C2P, 4 bits ------------ */ - -_SDL_Atari_C2pConvert4: -#if !defined(__mcoldfire__) - movel sp@(4),c2p_source - movel sp@(8),c2p_dest - movel sp@(12),c2p_width - movel sp@(16),c2p_height - movel sp@(20),c2p_dblligne - movel sp@(24),c2p_srcpitch - movel sp@(28),c2p_dstpitch - - moveml d2-d7/a2-a6,sp@- - - movel c2p_source,a0 - movel c2p_dest,a1 - lea _SDL_Atari_table_c2p,a2 - movel #0x00070001,d3 -#if defined(__mc68020__) - moveq #0,d0 -#endif - - movel c2p_height,d7 - subql #1,d7 -c2p4_bcly: - movel a0,a4 | Save start address of source - movel a1,a5 | Save start address of dest - - | Conversion - - movel c2p_width,d6 - lsrw #4,d6 - subql #1,d6 -c2p4_bclx: - | Octets 0-7 - - moveq #0,d1 - moveq #7,d5 -c2p4_bcl07: -#if defined(__mc68020__) - moveb a0@+,d0 - lea a2@(0,d0:w:4),a3 -#else - moveq #0,d0 - moveb a0@+,d0 - lslw #2,d0 - lea a2@(0,d0:w),a3 -#endif - lsll #1,d1 - orl a3@,d1 - dbra d5,c2p4_bcl07 - - movepl d1,a1@(0) - addw d3,a1 - swap d3 - - | Octets 8-15 - - moveq #0,d1 - moveq #7,d5 -c2p4_bcl815: -#if defined(__mc68020__) - moveb a0@+,d0 - lea a2@(0,d0:w:4),a3 -#else - moveq #0,d0 - moveb a0@+,d0 - lslw #2,d0 - lea a2@(0,d0:w),a3 -#endif - lsll #1,d1 - orl a3@,d1 - dbra d5,c2p4_bcl815 - - movepl d1,a1@(0) - addw d3,a1 - swap d3 - - dbra d6,c2p4_bclx - - | Double line ? - - tstl c2p_dblligne - beqs c2p4_nodblligne - - movel a5,a6 | src line - movel a5,a1 | dest line - addl c2p_dstpitch,a1 - - movel c2p_width,d6 - lsrw #3,d6 - subql #1,d6 -c2p4_copydbl: - movel a6@+,a1@+ - dbra d6,c2p4_copydbl - - addl c2p_dstpitch,a5 -c2p4_nodblligne: - - | Next line - - movel a4,a0 - addl c2p_srcpitch,a0 - movel a5,a1 - addl c2p_dstpitch,a1 - - dbra d7,c2p4_bcly - - moveml sp@+,d2-d7/a2-a6 -#endif - rts - -/* ------------ Conversion of a light palette in 4 bits ------------ */ - -_SDL_Atari_C2pConvert4_pal: -#if !defined(__mcoldfire__) - /* a0 is a 256-word light palette */ - movel sp@(4),a0 - - moveml d2-d3,sp@- - - lea _SDL_Atari_table_c2p,a1 - movew #255,d3 -c2p_pal_initbcl: - movew a0@+,d0 - lsrw #4,d0 - andw #15,d0 - - moveq #3,d1 -c2p_pal_initbyte: - btst d1,d0 - sne d2 - negw d2 - moveb d2,a1@(0,d1:w) - - dbra d1,c2p_pal_initbyte - - addql #4,a1 - dbra d3,c2p_pal_initbcl - - moveml sp@+,d2-d3 -#endif - rts - -/* ------------ Buffers ------------ */ - - .bss - - .even - .comm _SDL_Atari_C2pConvert,4 - .comm _SDL_Atari_table_c2p,1024 - - .comm c2p_source,4 /* Source framebuffer */ - .comm c2p_dest,4 /* Destination framebuffer */ - .comm c2p_width,4 /* Width of zone to convert */ - .comm c2p_height,4 /* Height of zone to convert */ - .comm c2p_dblligne,4 /* Double the lines while converting ? */ - .comm c2p_srcpitch,4 /* Source pitch */ - .comm c2p_dstpitch,4 /* Destination pitch */ - .comm c2p_cursrc,4 /* Current source line */ - .comm c2p_curdst,4 /* Current destination line */ - .comm c2p_rowlen,2 /* Line length in bytes */ - .comm c2p_row,2 /* Current line number */ diff --git a/apps/plugins/sdl/src/video/ataricommon/SDL_ataric2p_s.h b/apps/plugins/sdl/src/video/ataricommon/SDL_ataric2p_s.h deleted file mode 100644 index 48bdae7242..0000000000 --- a/apps/plugins/sdl/src/video/ataricommon/SDL_ataric2p_s.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ -#include "SDL_config.h" - -#ifndef _ATARI_C2P_h -#define _ATARI_C2P_h - -#include "SDL_stdinc.h" - -/*--- Functions pointers ---*/ - -/* Convert a chunky screen to bitplane screen */ - -extern void (*SDL_Atari_C2pConvert)( - Uint8 *src, /* Source screen (one byte=one pixel) */ - Uint8 *dest, /* Destination (4/8 bits planes) */ - Uint32 width, /* Dimensions of screen to convert */ - Uint32 height, - Uint32 dblligne, /* Double the lines when converting ? */ - Uint32 srcpitch, /* Length of one source line in bytes */ - Uint32 dstpitch /* Length of one destination line in bytes */ -); - -/*--- 8 bits functions ---*/ - -/* Convert a chunky screen to bitplane screen */ - -void SDL_Atari_C2pConvert8( - Uint8 *src, /* Source screen (one byte=one pixel) */ - Uint8 *dest, /* Destination (8 bits planes) */ - Uint32 width, /* Dimensions of screen to convert */ - Uint32 height, - Uint32 dblligne, /* Double the lines when converting ? */ - Uint32 srcpitch, /* Length of one source line in bytes */ - Uint32 dstpitch /* Length of one destination line in bytes */ -); - -/*--- 4 bits functions ---*/ - -/* Convert a chunky screen to bitplane screen */ - -void SDL_Atari_C2pConvert4( - Uint8 *src, /* Source screen (one byte=one pixel) */ - Uint8 *dest, /* Destination (4 bits planes) */ - Uint32 width, /* Dimensions of screen to convert */ - Uint32 height, - Uint32 dblligne, /* Double the lines when converting ? */ - Uint32 srcpitch, /* Length of one source line in bytes */ - Uint32 dstpitch /* Length of one destination line in bytes */ -); - -/* Conversion palette */ - -void SDL_Atari_C2pConvert4_pal(Uint16 *lightpalette); - -#endif /* _ATARI_C2P_h */ diff --git a/apps/plugins/sdl/src/video/ataricommon/SDL_ataridevmouse.c b/apps/plugins/sdl/src/video/ataricommon/SDL_ataridevmouse.c deleted file mode 100644 index 0527380bad..0000000000 --- a/apps/plugins/sdl/src/video/ataricommon/SDL_ataridevmouse.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2012 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - - Sam Lantinga - slouken@libsdl.org -*/ -#include "SDL_config.h" - -/* - MiNT /dev/mouse driver - - Patrice Mandin -*/ - -#include -#include - -#include "../../events/SDL_events_c.h" -#include "SDL_ataridevmouse_c.h" - -/* Defines */ - -#define DEVICE_NAME "/dev/mouse" - -/* Local variables */ - -static int handle = -1; -static int mouseb, prev_mouseb; - -/* Functions */ - -int SDL_AtariDevMouse_Open(void) -{ - int r; - const char *mousedev; - - /* - TODO: Fix the MiNT device driver, that locks mouse for other - applications, so this is disabled till fixed - */ - return 0; - - /* First, try SDL_MOUSEDEV device */ - mousedev = SDL_getenv("SDL_MOUSEDEV"); - if (!mousedev) { - handle = open(mousedev, 0); - } - - /* Failed, try default device */ - if (handle<0) { - handle = open(DEVICE_NAME, 0); - } - - if (handle<0) { - handle = -1; - return 0; - } - - /* Set non blocking mode */ - r = fcntl(handle, F_GETFL, 0); - if (r<0) { - close(handle); - handle = -1; - return 0; - } - - r |= O_NDELAY; - - r = fcntl(handle, F_SETFL, r); - if (r<0) { - close(handle); - handle = -1; - return 0; - } - - prev_mouseb = 7; - return 1; -} - -void SDL_AtariDevMouse_Close(void) -{ - if (handle>0) { - close(handle); - handle = -1; - } -} - -static int atari_GetButton(int button) -{ - switch(button) - { - case 0: - return SDL_BUTTON_RIGHT; - case 1: - return SDL_BUTTON_MIDDLE; - default: - break; - } - - return SDL_BUTTON_LEFT; -} - -void SDL_AtariDevMouse_PostMouseEvents(_THIS, SDL_bool buttonEvents) -{ - unsigned char buffer[3]; - int mousex, mousey; - - if (handle<0) { - return; - } - - mousex = mousey = 0; - while (read(handle, buffer, sizeof(buffer))==sizeof(buffer)) { - mouseb = buffer[0] & 7; - mousex += (char) buffer[1]; - mousey += (char) buffer[2]; - - /* Mouse button events */ - if (buttonEvents && (mouseb != prev_mouseb)) { - int i; - - for (i=0;i<3;i++) { - int curbutton, prevbutton; - - curbutton = mouseb & (1<