⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdl-1.2.9-xynth.diff

📁 CS架构的多平台的GUI系统
💻 DIFF
📖 第 1 页 / 共 5 页
字号:
+installdirs:+install: install-am+install-exec: install-exec-am+install-data: install-data-am+uninstall: uninstall-am++install-am: all-am+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am++installcheck: installcheck-am+install-strip:+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \+	  `test -z '$(STRIP)' || \+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install+mostlyclean-generic:++clean-generic:++distclean-generic:+	-rm -f $(CONFIG_CLEAN_FILES)++maintainer-clean-generic:+	@echo "This command is intended for maintainers to use"+	@echo "it deletes files that may require special tools to rebuild."+clean: clean-am++clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \+	mostlyclean-am++distclean: distclean-am+	-rm -rf ./$(DEPDIR)+	-rm -f Makefile+distclean-am: clean-am distclean-compile distclean-generic \+	distclean-libtool distclean-tags++dvi: dvi-am++dvi-am:++html: html-am++info: info-am++info-am:++install-data-am:++install-exec-am:++install-info: install-info-am++install-man:++installcheck-am:++maintainer-clean: maintainer-clean-am+	-rm -rf ./$(DEPDIR)+	-rm -f Makefile+maintainer-clean-am: distclean-am maintainer-clean-generic++mostlyclean: mostlyclean-am++mostlyclean-am: mostlyclean-compile mostlyclean-generic \+	mostlyclean-libtool++pdf: pdf-am++pdf-am:++ps: ps-am++ps-am:++uninstall-am: uninstall-info-am++.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \+	clean-libtool clean-noinstLTLIBRARIES ctags distclean \+	distclean-compile distclean-generic distclean-libtool \+	distclean-tags distdir dvi dvi-am html html-am info info-am \+	install install-am install-data install-data-am install-exec \+	install-exec-am install-info install-info-am install-man \+	install-strip installcheck installcheck-am installdirs \+	maintainer-clean maintainer-clean-generic mostlyclean \+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \+	pdf pdf-am ps ps-am tags uninstall uninstall-am \+	uninstall-info-am++# Tell versions [3.59,3.63) of GNU make to not export all variables.+# Otherwise a system limit (for SysV at least) may be exceeded.+.NOEXPORT:diff -U 3 -H -d -r -N SDL-1.2.9/src/video/xynth/SDL_xynth.h SDL-1.2.9-xynth/src/video/xynth/SDL_xynth.h--- SDL-1.2.9/src/video/xynth/SDL_xynth.h	1970-01-01 02:00:00.000000000 +0200+++ SDL-1.2.9-xynth/src/video/xynth/SDL_xynth.h	2005-07-24 03:13:38.000000000 +0300@@ -0,0 +1,95 @@+#ifndef SDL_xynth_h+#define SDL_xynth_h++#include <stdio.h>+#include <stdlib.h>+#include <unistd.h>+#include <xynth.h>++#include "SDL.h"+#include "SDL_error.h"+#include "SDL_mouse.h"+#include "SDL_mutex.h"+#include "SDL_events_c.h"+#include "SDL_sysvideo.h"+#include "SDL_sysevents.h"++#define _THIS	SDL_VideoDevice *this++int sdl_xynth_running;+int sdl_xynth_running_;++struct WMcursor {+	int unused;+};++struct SDL_PrivateVideoData {+    int w;+    int h;+    int bpp;+    void *buffer;+    s_thread_t *tid;+    s_window_t *window;+};++/* cursor.c */+void sdl_xynth_FreeWMCursor (_THIS, WMcursor *cursor);+WMcursor * sdl_xynth_CreateWMCursor (_THIS, Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y);+int sdl_xynth_ShowWMCursor (_THIS, WMcursor *cursor);+void sdl_xynth_WarpWMCursor (_THIS, Uint16 x, Uint16 y);+void sdl_xynth_MoveWMCursor (_THIS, int x, int y);+void sdl_xynth_CheckMouseMode (_THIS);++/* event.c */+void sdl_xynth_atexit (s_window_t *window);+void sdl_xynth_atevent (s_window_t *window, s_event_t *event);+void sdl_xynth_InitOSKeymap (_THIS);+void sdl_xynth_PumpEvents (_THIS);+SDL_keysym * sdl_xynth_translatekey(s_event_t *event, SDL_keysym *keysym);++/* gamma.c */+int sdl_xynth_SetGamma (_THIS, float red, float green, float blue);+int sdl_xynth_GetGamma (_THIS, float *red, float *green, float *blue);+int sdl_xynth_SetGammaRamp (_THIS, Uint16 *ramp);+int sdl_xynth_GetGammaRamp (_THIS, Uint16 *ramp);++/* gl.c */+int sdl_xynth_GL_LoadLibrary (_THIS, const char *path);+void* sdl_xynth_GL_GetProcAddress (_THIS, const char *proc);+int sdl_xynth_GL_GetAttribute (_THIS, SDL_GLattr attrib, int* value);+int sdl_xynth_GL_MakeCurrent (_THIS);+void sdl_xynth_GL_SwapBuffers (_THIS);++/* hw.c */+int sdl_xynth_AllocHWSurface (_THIS, SDL_Surface *surface);+int sdl_xynth_CheckHWBlit (_THIS, SDL_Surface *src, SDL_Surface *dst);+int sdl_xynth_FillHWRect (_THIS, SDL_Surface *dst, SDL_Rect *rect, Uint32 color);+int sdl_xynth_SetHWColorKey (_THIS, SDL_Surface *surface, Uint32 key);+int sdl_xynth_SetHWAlpha (_THIS, SDL_Surface *surface, Uint8 value);+int sdl_xynth_LockHWSurface (_THIS, SDL_Surface *surface);+void sdl_xynth_UnlockHWSurface (_THIS, SDL_Surface *surface);+int sdl_xynth_FlipHWSurface (_THIS, SDL_Surface *surface);+void sdl_xynth_FreeHWSurface (_THIS, SDL_Surface *surface);++/* video.c */+int sdl_xynth_Available(void);+void sdl_xynth_DeleteDevice(SDL_VideoDevice *device);+SDL_VideoDevice *sdl_xynth_CreateDevice(int devindex);+int sdl_xynth_VideoInit (_THIS, SDL_PixelFormat *vformat);+SDL_Rect ** sdl_xynth_ListModes (_THIS, SDL_PixelFormat *format, Uint32 flags);+SDL_Surface * sdl_xynth_SetVideoMode (_THIS, SDL_Surface *current, int width, int height, int bpp, Uint32 flags);+int sdl_xynth_ToggleFullScreen (_THIS, int on);+void sdl_xynth_UpdateMouse (_THIS);+SDL_Overlay * sdl_xynth_CreateYUVOverlay (_THIS, int width, int height, Uint32 format, SDL_Surface *display);+int sdl_xynth_SetColors (_THIS, int firstcolor, int ncolors, SDL_Color *colors);+void sdl_xynth_UpdateRects (_THIS, int numrects, SDL_Rect *rects);+void sdl_xynth_VideoQuit (_THIS);++/* wm.c */+void sdl_xynth_SetCaption (_THIS, const char *title, const char *icon);+void sdl_xynth_SetIcon (_THIS, SDL_Surface *icon, Uint8 *mask);+int sdl_xynth_IconifyWindow (_THIS);+SDL_GrabMode sdl_xynth_GrabInput (_THIS, SDL_GrabMode mode);+int sdl_xynth_GetWMInfo (_THIS, SDL_SysWMinfo *info);++#endif /* SDL_xynth_h */diff -U 3 -H -d -r -N SDL-1.2.9/src/video/xynth/SDL_xynthcursor.c SDL-1.2.9-xynth/src/video/xynth/SDL_xynthcursor.c--- SDL-1.2.9/src/video/xynth/SDL_xynthcursor.c	1970-01-01 02:00:00.000000000 +0200+++ SDL-1.2.9-xynth/src/video/xynth/SDL_xynthcursor.c	2005-10-04 20:47:04.000000000 +0300@@ -0,0 +1,57 @@+#include "SDL_xynth.h"++#if 0+	#define debugf(a) printf(a);+#else+	#define debugf(a)+#endif++/* Free a window manager cursor+   This function can be NULL if CreateWMCursor is also NULL.+ */+void sdl_xynth_FreeWMCursor (_THIS, WMcursor *cursor)+{+	free(cursor);+	debugf("sdl_xynth_FreeWMCursor\n");+}++/* If not NULL, create a black/white window manager cursor */+WMcursor * sdl_xynth_CreateWMCursor (_THIS, Uint8 *data, Uint8 *mask, int w, int h, int hot_x, int hot_y)+{+	WMcursor *cursor = (WMcursor *) s_malloc(sizeof(WMcursor));+	debugf("sdl_xynth_CreateWMCursor\n");+	return cursor;+}++/* Show the specified cursor, or hide if cursor is NULL */+int sdl_xynth_ShowWMCursor (_THIS, WMcursor *cursor)+{+	debugf("sdl_xynth_ShowWMCursor\n");+	return 1;+}++/* Warp the window manager cursor to (x,y)+   If NULL, a mouse motion event is posted internally.+ */+void sdl_xynth_WarpWMCursor (_THIS, Uint16 x, Uint16 y)+{+	debugf("sdl_xynth_WarpWMCursor\n");+}++/* If not NULL, this is called when a mouse motion event occurs */+void sdl_xynth_MoveWMCursor (_THIS, int x, int y)+{+	debugf("sdl_xynth_MoveWMCursor\n");+}++/* Determine whether the mouse should be in relative mode or not.+   This function is called when the input grab state or cursor+   visibility state changes.+   If the cursor is not visible, and the input is grabbed, the+   driver can place the mouse in relative mode, which may result+   in higher accuracy sampling of the pointer motion.+*/+void sdl_xynth_CheckMouseMode (_THIS)+{+	debugf("sdl_xynth_CheckMouseMode\n");+}diff -U 3 -H -d -r -N SDL-1.2.9/src/video/xynth/SDL_xynthevent.c SDL-1.2.9-xynth/src/video/xynth/SDL_xynthevent.c--- SDL-1.2.9/src/video/xynth/SDL_xynthevent.c	1970-01-01 02:00:00.000000000 +0200+++ SDL-1.2.9-xynth/src/video/xynth/SDL_xynthevent.c	2005-10-04 21:50:55.000000000 +0300@@ -0,0 +1,188 @@+#include "SDL_xynth.h"++static SDLKey sdl_xynth_keymap[128];++void sdl_xynth_atexit (s_window_t *window)+{+	if (sdl_xynth_running) {+		while (sdl_xynth_running_) {+			usleep(20000);+		}+		sdl_xynth_running = 0;+		SDL_PrivateQuit();+	}+}++void sdl_xynth_atevent (s_window_t *window, s_event_t *event)+{+        int state = 0;+        int button = 0;+        +	if ((event->type & MOUSE_EVENT) &&+	    ((event->mouse->x >= window->surface->buf.x) &&+	     (event->mouse->x <= window->surface->buf.x + window->surface->buf.w) &&+	     (event->mouse->y >= window->surface->buf.y) &&+	     (event->mouse->y <= window->surface->buf.y + window->surface->buf.h))) {+		if (event->type & MOUSE_OVER) {+			if (event->type & MOUSE_HINT) {+				state = SDL_PRESSED;+			}+			SDL_PrivateMouseMotion(state, 0, event->mouse->x - window->surface->buf.x, event->mouse->y - window->surface->buf.y);+		} else if (event->type & (MOUSE_PRESSED | MOUSE_RELEASED | MOUSE_CLICKED)) {+			if (event->type & (MOUSE_PRESSED)) {+				state = SDL_PRESSED;+			}+			if (event->type & (MOUSE_RELEASED | MOUSE_CLICKED)) {+				state = SDL_RELEASED;+			}+			switch (event->mouse->b) {+				case MOUSE_RIGHTBUTTON:		button = SDL_BUTTON_RIGHT;	break;+				case MOUSE_MIDDLEBUTTON:	button = SDL_BUTTON_MIDDLE;	break;+				case MOUSE_LEFTBUTTON:		button = SDL_BUTTON_LEFT;	break;+				default:			button = 0;			break;+			}+			SDL_PrivateMouseButton(state, button, event->mouse->x - window->surface->buf.x, event->mouse->y - window->surface->buf.y);+		}+	}+	if (event->type & KEYBD_EVENT) {+		SDL_keysym keysym;+		if (event->type & KEYBD_PRESSED) {+			state = SDL_PRESSED;+		} else if (event->type & KEYBD_RELEASED) {+			state = SDL_RELEASED;+		}+		SDL_PrivateKeyboard(state, sdl_xynth_translatekey(event, &keysym));+	}+}++/* Handle any queued OS events */+void sdl_xynth_PumpEvents(_THIS)+{+}++/* Initialize keyboard mapping for this driver */+void sdl_xynth_InitOSKeymap (_THIS)+{+	int i;+	+	for (i = 0; i < SDL_TABLESIZE(sdl_xynth_keymap); i++) {+		sdl_xynth_keymap[i] = SDLK_UNKNOWN;+	}+	+	sdl_xynth_keymap[S_KEYCODE_ESCAPE] = SDLK_ESCAPE;+	sdl_xynth_keymap[S_KEYCODE_ONE] = SDLK_1;+	sdl_xynth_keymap[S_KEYCODE_TWO] = SDLK_2;+	sdl_xynth_keymap[S_KEYCODE_THREE] = SDLK_3;+	sdl_xynth_keymap[S_KEYCODE_FOUR] = SDLK_4;+	sdl_xynth_keymap[S_KEYCODE_FIVE] = SDLK_5;+	sdl_xynth_keymap[S_KEYCODE_SIX] = SDLK_6;+	sdl_xynth_keymap[S_KEYCODE_SEVEN] = SDLK_7;+	sdl_xynth_keymap[S_KEYCODE_EIGHT] = SDLK_8;+	sdl_xynth_keymap[S_KEYCODE_NINE] = SDLK_9;+	sdl_xynth_keymap[S_KEYCODE_ZERO] = SDLK_0;+	sdl_xynth_keymap[S_KEYCODE_MINUS] = SDLK_MINUS;+	sdl_xynth_keymap[S_KEYCODE_EQUAL] = SDLK_EQUALS;+	sdl_xynth_keymap[S_KEYCODE_DELETE] = SDLK_BACKSPACE;+	sdl_xynth_keymap[S_KEYCODE_TAB] = SDLK_TAB;+	sdl_xynth_keymap[S_KEYCODE_q] = SDLK_q;+	sdl_xynth_keymap[S_KEYCODE_w] = SDLK_w;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -