Commit 89476762 authored by Patrice Mandin's avatar Patrice Mandin

Update GEM driver to new API, will have to fill the void later :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402516
parent ff411139
...@@ -32,10 +32,9 @@ ...@@ -32,10 +32,9 @@
#include <gem.h> #include <gem.h>
#include "../../events/SDL_sysevents.h"
#include "../../events/SDL_events_c.h"
#include "SDL_gemvideo.h" #include "SDL_gemvideo.h"
#include "SDL_gemevents_c.h" #include "SDL_gemevents.h"
#include "../../events/SDL_events_c.h"
#include "../ataricommon/SDL_atarikeys.h" /* for keyboard scancodes */ #include "../ataricommon/SDL_atarikeys.h" /* for keyboard scancodes */
#include "../ataricommon/SDL_atarievents_c.h" #include "../ataricommon/SDL_atarievents_c.h"
#include "../ataricommon/SDL_xbiosevents_c.h" #include "../ataricommon/SDL_xbiosevents_c.h"
...@@ -54,21 +53,10 @@ static void do_mouse(_THIS, short mx, short my, short mb, short ks); ...@@ -54,21 +53,10 @@ static void do_mouse(_THIS, short mx, short my, short mb, short ks);
/* Functions */ /* Functions */
void
GEM_InitOSKeymap(_THIS)
{
SDL_memset(gem_currentkeyboard, 0, sizeof(gem_currentkeyboard));
SDL_memset(gem_previouskeyboard, 0, sizeof(gem_previouskeyboard));
/* Mouse init */
GEM_mouse_relative = SDL_FALSE;
SDL_Atari_InitInternalKeymap(this);
}
void void
GEM_PumpEvents(_THIS) GEM_PumpEvents(_THIS)
{ {
#if 0
short mousex, mousey, mouseb, dummy; short mousex, mousey, mouseb, dummy;
short kstate, prevkc, prevks; short kstate, prevkc, prevks;
int i; int i;
...@@ -88,11 +76,8 @@ GEM_PumpEvents(_THIS) ...@@ -88,11 +76,8 @@ GEM_PumpEvents(_THIS)
if (!GEM_fullscreen && (GEM_handle >= 0)) { if (!GEM_fullscreen && (GEM_handle >= 0)) {
wind_get(GEM_handle, WF_WORKXYWH, &x2, &y2, &w2, &h2); wind_get(GEM_handle, WF_WORKXYWH, &x2, &y2, &w2, &h2);
event_mask |= MU_M1; event_mask |= MU_M1;
if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS)) { mouse_event = ((SDL_GetAppState() & SDL_APPMOUSEFOCUS) ==
mouse_event = MO_LEAVE; SDL_APPMOUSEFOCUS) ? MO_LEAVE : MO_ENTER;
} else {
mouse_event = MO_ENTER;
}
} }
resultat = evnt_multi(event_mask, resultat = evnt_multi(event_mask,
...@@ -120,12 +105,11 @@ GEM_PumpEvents(_THIS) ...@@ -120,12 +105,11 @@ GEM_PumpEvents(_THIS)
/* Mouse entering/leaving window */ /* Mouse entering/leaving window */
if (resultat & MU_M1) { if (resultat & MU_M1) {
if (this->input_grab == SDL_GRAB_OFF) { if (this->input_grab == SDL_GRAB_OFF) {
if (SDL_GetAppState() & SDL_APPMOUSEFOCUS) { /* Switch mouse focus state */
SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS); SDL_PrivateAppActive((mouse_event == MO_ENTER),
} else { SDL_APPMOUSEFOCUS);
SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
}
} }
GEM_CheckMouseMode(this);
} }
/* Timer event ? */ /* Timer event ? */
...@@ -165,15 +149,17 @@ GEM_PumpEvents(_THIS) ...@@ -165,15 +149,17 @@ GEM_PumpEvents(_THIS)
} }
GEM_refresh_name = SDL_FALSE; GEM_refresh_name = SDL_FALSE;
} }
#endif
} }
static int static int
do_messages(_THIS, short *message) do_messages(_THIS, short *message)
{ {
int quit, posted; #if 0
int quit, posted, check_mouse_mode;
short x2, y2, w2, h2; short x2, y2, w2, h2;
quit = 0; quit = check_mouse_mode = 0;
switch (message[0]) { switch (message[0]) {
case WM_CLOSED: case WM_CLOSED:
case AP_TERM: case AP_TERM:
...@@ -192,6 +178,7 @@ do_messages(_THIS, short *message) ...@@ -192,6 +178,7 @@ do_messages(_THIS, short *message)
if (VDI_setpalette) { if (VDI_setpalette) {
VDI_setpalette(this, VDI_curpalette); VDI_setpalette(this, VDI_curpalette);
} }
check_mouse_mode = 1;
break; break;
case WM_REDRAW: case WM_REDRAW:
if (!GEM_lock_redraw) { if (!GEM_lock_redraw) {
...@@ -215,6 +202,7 @@ do_messages(_THIS, short *message) ...@@ -215,6 +202,7 @@ do_messages(_THIS, short *message)
0, 0); 0, 0);
GEM_refresh_name = SDL_FALSE; GEM_refresh_name = SDL_FALSE;
} }
check_mouse_mode = 1;
break; break;
case WM_UNICONIFY: case WM_UNICONIFY:
wind_set(message[3], WF_UNICONIFY, message[4], message[5], wind_set(message[3], WF_UNICONIFY, message[4], message[5],
...@@ -231,6 +219,7 @@ do_messages(_THIS, short *message) ...@@ -231,6 +219,7 @@ do_messages(_THIS, short *message)
0, 0); 0, 0);
GEM_refresh_name = SDL_FALSE; GEM_refresh_name = SDL_FALSE;
} }
check_mouse_mode = 1;
break; break;
case WM_SIZED: case WM_SIZED:
wind_set(message[3], WF_CURRXYWH, message[4], message[5], wind_set(message[3], WF_CURRXYWH, message[4], message[5],
...@@ -268,15 +257,24 @@ do_messages(_THIS, short *message) ...@@ -268,15 +257,24 @@ do_messages(_THIS, short *message)
if (VDI_setpalette) { if (VDI_setpalette) {
VDI_setpalette(this, VDI_oldpalette); VDI_setpalette(this, VDI_oldpalette);
} }
check_mouse_mode = 1;
break; break;
} }
if (check_mouse_mode) {
GEM_CheckMouseMode(this);
}
return quit; return quit;
#else
return 0;
#endif
} }
static void static void
do_keyboard(short kc, short ks) do_keyboard(short kc, short ks)
{ {
#if 0
int scancode, asciicode; int scancode, asciicode;
if (kc) { if (kc) {
...@@ -293,11 +291,13 @@ do_keyboard(short kc, short ks) ...@@ -293,11 +291,13 @@ do_keyboard(short kc, short ks)
gem_currentkeyboard[SCANCODE_LEFTCONTROL] = 0xFF; gem_currentkeyboard[SCANCODE_LEFTCONTROL] = 0xFF;
if (ks & K_ALT) if (ks & K_ALT)
gem_currentkeyboard[SCANCODE_LEFTALT] = 0xFF; gem_currentkeyboard[SCANCODE_LEFTALT] = 0xFF;
#endif
} }
static void static void
do_mouse(_THIS, short mx, short my, short mb, short ks) do_mouse(_THIS, short mx, short my, short mb, short ks)
{ {
#if 0
static short prevmousex = 0, prevmousey = 0, prevmouseb = 0; static short prevmousex = 0, prevmousey = 0, prevmouseb = 0;
short x2, y2, w2, h2; short x2, y2, w2, h2;
...@@ -377,6 +377,7 @@ do_mouse(_THIS, short mx, short my, short mb, short ks) ...@@ -377,6 +377,7 @@ do_mouse(_THIS, short mx, short my, short mb, short ks)
gem_currentkeyboard[SCANCODE_LEFTCONTROL] = 0xFF; gem_currentkeyboard[SCANCODE_LEFTCONTROL] = 0xFF;
if (ks & K_ALT) if (ks & K_ALT)
gem_currentkeyboard[SCANCODE_LEFTALT] = 0xFF; gem_currentkeyboard[SCANCODE_LEFTALT] = 0xFF;
#endif
} }
/* vi: set ts=4 sw=4 expandtab: */ /* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 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_gemevents_h
#define _SDL_gemevents_h
extern void GEM_PumpEvents(_THIS);
#endif /* _SDL_gemevents_h */
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 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_gemvideo.h"
#include "../../events/SDL_keyboard_c.h"
void
GEM_InitKeyboard(_THIS)
{
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
SDL_Keyboard keyboard;
SDL_zero(keyboard);
data->keyboard = SDL_AddKeyboard(&keyboard, -1);
}
void
GEM_QuitKeyboard(_THIS)
{
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
SDL_DelKeyboard(data->keyboard);
}
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 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_gemkeyboard_h
#define _SDL_gemkeyboard_h
extern void GEM_InitKeyboard(_THIS);
extern void GEM_QuitKeyboard(_THIS);
#endif /* _SDL_gemkeyboard_h */
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 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_gemvideo.h"
void
GEM_InitModes(_THIS)
{
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
Uint32 Rmask, Gmask, Bmask, Amask;
SDL_VideoDisplay display;
SDL_DisplayData *displaydata;
SDL_DisplayMode mode;
int bpp;
/* read vdi bpp, rmask, gmask, bmask, amask */
mode.format =
SDL_MasksToPixelFormatEnum(bpp, Rmask, Gmask, Bmask, Amask);
mode.w = 0 /* vdi width */;
mode.h = 0 /* vdi height */;
mode.refresh_rate = 0;
mode.driverdata = NULL;
displaydata = (SDL_DisplayData *) SDL_malloc(sizeof(*displaydata));
if (!displaydata) {
return;
}
/* fill display data */
SDL_zero(display);
display.desktop_mode = mode;
display.current_mode = mode;
display.driverdata = displaydata;
SDL_AddVideoDisplay(&display);
}
void
GEM_GetDisplayModes(_THIS)
{
SDL_DisplayData *data = (SDL_DisplayData *) SDL_CurrentDisplay.driverdata;
SDL_DisplayMode mode;
//SDL_AddDisplayMode(_this->current_display, &mode);
}
int
GEM_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
{
//SDL_DisplayModeData *data = (SDL_DisplayModeData *) mode->driverdata;
return -1;
}
void
GEM_QuitModes(_THIS)
{
}
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 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_gemmodes_h
#define _SDL_gemmodes_h
typedef struct
{
int width;
int height;
int depth;
} SDL_DisplayData;
extern void GEM_InitModes(_THIS);
extern void GEM_GetDisplayModes(_THIS);
extern int GEM_SetDisplayMode(_THIS, SDL_DisplayMode * mode);
extern void GEM_QuitModes(_THIS);
#endif /* _SDL_gemmodes_h */
/* vi: set ts=4 sw=4 expandtab: */
...@@ -21,161 +21,26 @@ ...@@ -21,161 +21,26 @@
*/ */
#include "SDL_config.h" #include "SDL_config.h"
/* #include "SDL_gemvideo.h"
* GEM Mouse manager
*
* Patrice Mandin
*/
#include <gem.h>
#include "SDL_mouse.h"
#include "../../events/SDL_events_c.h"
#include "../SDL_cursor_c.h"
#include "SDL_gemmouse_c.h"
/* Defines */
/*#define DEBUG_VIDEO_GEM 1*/
#define MAXCURWIDTH 16
#define MAXCURHEIGHT 16
/* The implementation dependent data for the window manager cursor */
struct WMcursor
{
MFORM *mform_p;
};
#include "../../events/SDL_mouse_c.h"
void void
GEM_FreeWMCursor(_THIS, WMcursor * cursor) GEM_InitMouse(_THIS)
{ {
if (cursor == NULL) SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
return; SDL_Mouse mouse;
graf_mouse(ARROW, NULL);
if (cursor->mform_p != NULL) SDL_zero(mouse);
SDL_free(cursor->mform_p); data->mouse = SDL_AddMouse(&mouse, -1);
SDL_free(cursor);
} }
WMcursor *
GEM_CreateWMCursor(_THIS,
Uint8 * data, Uint8 * mask, int w, int h, int hot_x,
int hot_y)
{
WMcursor *cursor;
MFORM *new_mform;
int i;
/* Check the size */
if ((w > MAXCURWIDTH) || (h > MAXCURHEIGHT)) {
SDL_SetError("Only cursors of dimension (%dx%d) are allowed",
MAXCURWIDTH, MAXCURHEIGHT);
return (NULL);
}
/* Allocate the cursor memory */
cursor = (WMcursor *) SDL_malloc(sizeof(WMcursor));
if (cursor == NULL) {
SDL_OutOfMemory();
return (NULL);
}
/* Allocate mform */
new_mform = (MFORM *) SDL_malloc(sizeof(MFORM));
if (new_mform == NULL) {
SDL_free(cursor);
SDL_OutOfMemory();
return (NULL);
}
cursor->mform_p = new_mform;
new_mform->mf_xhot = hot_x;
new_mform->mf_yhot = hot_y;
new_mform->mf_nplanes = 1;
new_mform->mf_fg = 0;
new_mform->mf_bg = 1;
for (i = 0; i < MAXCURHEIGHT; i++) {
new_mform->mf_mask[i] = 0;
new_mform->mf_data[i] = 0;
}
if (w <= 8) {
for (i = 0; i < h; i++) {
new_mform->mf_mask[i] = mask[i] << 8;
new_mform->mf_data[i] = data[i] << 8;
}
} else {
for (i = 0; i < h; i++) {
new_mform->mf_mask[i] = mask[i << 1] << 8 | mask[(i << 1) + 1];
new_mform->mf_data[i] = data[i << 1] << 8 | data[(i << 1) + 1];
}
}
#ifdef DEBUG_VIDEO_GEM
for (i = 0; i < h; i++) {
printf("sdl:video:gem: cursor, line %d = 0x%04x\n", i,
new_mform->mf_mask[i]);
}
printf("sdl:video:gem: CreateWMCursor(): done\n");
#endif
return cursor;
}
int
GEM_ShowWMCursor(_THIS, WMcursor * cursor)
{
/*
if (cursor == NULL) {
graf_mouse(M_OFF, NULL);
} else if (cursor->mform_p) {
graf_mouse(USER_DEF, cursor->mform_p);
}
*/
#ifdef DEBUG_VIDEO_GEM
printf("sdl:video:gem: ShowWMCursor(0x%08x)\n", (long) cursor);
#endif
return 1;
}
#if 0
void void
GEM_WarpWMCursor(_THIS, Uint16 x, Uint16 y) GEM_QuitMouse(_THIS)
{ {
/* This seems to work only on AES 3.4 (Falcon) */ SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
EVNTREC warpevent;
warpevent.ap_event = APPEVNT_MOUSE;
warpevent.ap_value = (x << 16) | y;
appl_tplay(&warpevent, 1, 1000); SDL_DelMouse(data->mouse);
}
#endif
void
GEM_CheckMouseMode(_THIS)
{
/* If the mouse is hidden and input is grabbed, we use relative mode */
if ((!(SDL_cursorstate & CURSOR_VISIBLE)) &&
(this->input_grab != SDL_GRAB_OFF) &&
(SDL_GetAppState() & SDL_APPACTIVE)) {
SDL_AtariXbios_LockMousePosition(SDL_TRUE);
GEM_mouse_relative = SDL_TRUE;
} else {
SDL_AtariXbios_LockMousePosition(SDL_FALSE);
GEM_mouse_relative = SDL_FALSE;
graf_mouse(M_ON, NULL);
}
} }
/* vi: set ts=4 sw=4 expandtab: */ /* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 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_gemmouse_h
#define _SDL_gemmouse_h
extern void GEM_InitMouse(_THIS);
extern void GEM_QuitMouse(_THIS);
#endif /* _SDL_gemmouse_h */
/* vi: set ts=4 sw=4 expandtab: */
This diff is collapsed.
...@@ -24,163 +24,28 @@ ...@@ -24,163 +24,28 @@
#ifndef _SDL_gemvideo_h #ifndef _SDL_gemvideo_h
#define _SDL_gemvideo_h #define _SDL_gemvideo_h
#include "SDL_mutex.h"
#include "../SDL_sysvideo.h" #include "../SDL_sysvideo.h"
/* Hidden "this" pointer for the video functions */ #include "SDL_gemevents.h"
#define _THIS SDL_VideoDevice *this #include "SDL_gemkeyboard.h"
#include "SDL_gemmodes.h"
/* Functions prototypes */ #include "SDL_gemmouse.h"
void GEM_wind_redraw(_THIS, int winhandle, short *inside); #include "SDL_gemwindow.h"
/* Private display data */ /* Private display data */
#define B2S_C2P_1TO2 (1<<0) /* C2P convert buffer 1 to buffer 2 */ typedef struct
#define B2S_C2P_1TOS (1<<1) /* C2P convert buffer 1 to screen */
#define B2S_VROCPYFM_1TOS (1<<2) /* vro_cpyfm() buffer 1 to screen */
#define B2S_VROCPYFM_2TOS (1<<3) /* vro_cpyfm() buffer 2 to screen */
#define SDL_NUMMODES 1 /* Fullscreen */
struct SDL_PrivateVideoData
{ {
Uint16 buf2scr_ops; /* Operations to get buffer to screen */ int mouse;
void *buffer1; /* Our shadow buffers */ int keyboard;
void *buffer2;
/* VDI infos */ /* VDI infos */
short vdi_handle; /* VDI handle */ short vdi_handle; /* workstation handle */
short full_w, full_h; /* Fullscreen size */
short bpp; /* Colour depth */
short pixelsize; /* Bytes per pixel */
short old_numcolors; /* Number of colors in saved palette */
Uint16 pitch; /* Line length */
Uint16 format; /* Screen format */
void *screen; /* Screen address */
Uint32 red, green, blue, alpha; /* Screen components */
Uint32 screensize;
short blit_coords[8]; /* Coordinates for bitblt */
MFDB src_mfdb, dst_mfdb; /* VDI MFDB for bitblt */
Uint16 old_palette[256][3]; /* Saved current palette */
Uint16 cur_palette[256][3]; /* SDL application palette */
/* Function to set/restore palette */
void (*setpalette) (_THIS, Uint16 newpal[256][3]);
/* GEM infos */
short desk_x, desk_y; /* Desktop properties */
short desk_w, desk_h;
short win_handle; /* Our window handle */
int window_type; /* Window type */
const char *title_name; /* Window title */
const char *icon_name; /* Icon title */
short version; /* AES version */
short wfeatures; /* AES window features */
SDL_bool refresh_name; /* Change window title ? */
SDL_bool window_fulled; /* Window maximized ? */
SDL_bool mouse_relative; /* Report relative mouse movement */
SDL_bool locked; /* AES locked for fullscreen ? */
SDL_bool lock_redraw; /* Prevent redraw till buffers are setup */
short message[8]; /* To self-send an AES message */
void *menubar; /* Menu bar save buffer when going fullscreen */
SDL_bool use_dev_mouse; /* Use /dev/mouse ? */
SDL_bool fullscreen; /* Fullscreen or windowed mode ? */
SDL_Rect *SDL_modelist[SDL_NUMMODES + 1]; /* Mode list */
SDL_Surface *icon; /* The icon */
};
/* Hidden structure -> variables names */ /* AES infos */
#define VDI_handle (this->hidden->vdi_handle) int wfeatures; /* window features */
#define VDI_w (this->hidden->full_w) } SDL_VideoData;
#define VDI_h (this->hidden->full_h)
#define VDI_bpp (this->hidden->bpp)
#define VDI_pixelsize (this->hidden->pixelsize)
#define VDI_oldnumcolors (this->hidden->old_numcolors)
#define VDI_oldpalette (this->hidden->old_palette)
#define VDI_curpalette (this->hidden->cur_palette)
#define VDI_setpalette (this->hidden->setpalette)
#define VDI_pitch (this->hidden->pitch)
#define VDI_format (this->hidden->format)
#define VDI_screen (this->hidden->screen)
#define VDI_redmask (this->hidden->red)
#define VDI_greenmask (this->hidden->green)
#define VDI_bluemask (this->hidden->blue)
#define VDI_alphamask (this->hidden->alpha)
#define VDI_screensize (this->hidden->screensize)
#define VDI_src_mfdb (this->hidden->src_mfdb)
#define VDI_dst_mfdb (this->hidden->dst_mfdb)
#define VDI_blit_coords (this->hidden->blit_coords)
#define GEM_desk_x (this->hidden->desk_x)
#define GEM_desk_y (this->hidden->desk_y)
#define GEM_desk_w (this->hidden->desk_w)
#define GEM_desk_h (this->hidden->desk_h)
#define GEM_handle (this->hidden->win_handle)
#define GEM_win_type (this->hidden->window_type)
#define GEM_title_name (this->hidden->title_name)
#define GEM_icon_name (this->hidden->icon_name)
#define GEM_refresh_name (this->hidden->refresh_name)
#define GEM_version (this->hidden->version)
#define GEM_wfeatures (this->hidden->wfeatures)
#define GEM_win_fulled (this->hidden->window_fulled)
#define GEM_mouse_relative (this->hidden->mouse_relative)
#define GEM_locked (this->hidden->locked)
#define GEM_lock_redraw (this->hidden->lock_redraw)
#define GEM_message (this->hidden->message)
#define SDL_modelist (this->hidden->SDL_modelist)
#define GEM_icon (this->hidden->icon)
#define GEM_fullscreen (this->hidden->fullscreen)
#define GEM_menubar (this->hidden->menubar)
#define GEM_usedevmouse (this->hidden->use_dev_mouse)
#define GEM_buffer1 (this->hidden->buffer1)
#define GEM_buffer2 (this->hidden->buffer2)
#define GEM_bufops (this->hidden->buf2scr_ops)
#define VDI_FBMASK(amask, rmask, gmask, bmask) \
VDI_alphamask = (amask); \
VDI_redmask = (rmask); \
VDI_greenmask = (gmask); \
VDI_bluemask = (bmask);
/*
Possible buffer to screen operations:
TC: 8 (chunky),15,16,24,32 bpp
8I: 8 bpp planes
FB: screen framebuffer address available
FS: fullscreen
TC, FB, FS:
- draw to screen
8I, FB, FS:
- draw to buffer 1
- C2P from buffer 1 to screen
TC, !FB, FS:
- draw to buffer 1
- vro_cpyfm() from buffer 1 to screen
8I, !FB, FS:
- draw to buffer 1
- C2P from buffer 1 to buffer 2
- vro_cpyfm() from buffer 2 to screen
TC, FB, !FS:
- draw to buffer 1
- vro_cpyfm() from buffer 1 to screen
8I, FB, !FS:
- draw to buffer 1
- C2P from buffer 1 to buffer 2
- vro_cpyfm() from buffer 2 to screen
TC, !FB, !FS:
- draw to buffer 1
- vro_cpyfm() from buffer 1 to screen
8I, !FB, !FS:
- draw to buffer 1
- C2P from buffer 1 to buffer 2
- vro_cpyfm() from buffer 2 to screen
*/
#endif /* _SDL_gemvideo_h */ #endif /* _SDL_gemvideo_h */
/* vi: set ts=4 sw=4 expandtab: */ /* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 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_sysvideo.h"
#include "../../events/SDL_keyboard_c.h"
#include "SDL_gemvideo.h"
/* This is included after SDL_win32video.h, which includes windows.h */
#include "SDL_syswm.h"
int
GEM_CreateWindow(_THIS, SDL_Window * window)
{
return -1;
}
int
GEM_CreateWindowFrom(_THIS, SDL_Window * window, const void *data)
{
return -1;
}
void
GEM_SetWindowTitle(_THIS, SDL_Window * window)
{
}
void
GEM_SetWindowPosition(_THIS, SDL_Window * window)
{
}
void
GEM_SetWindowSize(_THIS, SDL_Window * window)
{
}
void
GEM_ShowWindow(_THIS, SDL_Window * window)
{
}
void
GEM_HideWindow(_THIS, SDL_Window * window)
{
}
void
GEM_RaiseWindow(_THIS, SDL_Window * window)
{
}
void
GEM_MaximizeWindow(_THIS, SDL_Window * window)
{
}
void
GEM_MinimizeWindow(_THIS, SDL_Window * window)
{
}
void
GEM_RestoreWindow(_THIS, SDL_Window * window)
{
}
void
GEM_SetWindowGrab(_THIS, SDL_Window * window)
{
}
void
GEM_DestroyWindow(_THIS, SDL_Window * window)
{
}
SDL_bool
GEM_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info)
{
return SDL_FALSE;
}
/* vi: set ts=4 sw=4 expandtab: */
/*
SDL - Simple DirectMedia Layer
Copyright (C) 1997-2006 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_gemwindow_h
#define _SDL_gemwindow_h
typedef struct
{
SDL_WindowID windowID;
struct SDL_VideoData *videodata;
} SDL_WindowData;
extern int GEM_CreateWindow(_THIS, SDL_Window * window);
extern int GEM_CreateWindowFrom(_THIS, SDL_Window * window, const void *data);
extern void GEM_SetWindowTitle(_THIS, SDL_Window * window);
extern void GEM_SetWindowPosition(_THIS, SDL_Window * window);
extern void GEM_SetWindowSize(_THIS, SDL_Window * window);
extern void GEM_ShowWindow(_THIS, SDL_Window * window);
extern void GEM_HideWindow(_THIS, SDL_Window * window);
extern void GEM_RaiseWindow(_THIS, SDL_Window * window);
extern void GEM_MaximizeWindow(_THIS, SDL_Window * window);
extern void GEM_MinimizeWindow(_THIS, SDL_Window * window);
extern void GEM_RestoreWindow(_THIS, SDL_Window * window);
extern void GEM_SetWindowGrab(_THIS, SDL_Window * window);
extern void GEM_DestroyWindow(_THIS, SDL_Window * window);
extern SDL_bool GEM_GetWindowWMInfo(_THIS, SDL_Window * window,
struct SDL_SysWMinfo *info);
#endif /* _SDL_gemwindow_h */
/* vi: set ts=4 sw=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment