Skip to content
Permalink
Browse files

Use new C2P routine + corrections for iconification window

  • Loading branch information
pmandin committed Nov 12, 2003
1 parent e7c35da commit d5c17cef35564921ca463475f4e6ddeef47206c6
Showing with 552 additions and 324 deletions.
  1. +9 −0 src/video/gem/SDL_gemevents.c
  2. +18 −6 src/video/gem/SDL_gemmouse.c
  3. +394 −264 src/video/gem/SDL_gemvideo.c
  4. +71 −8 src/video/gem/SDL_gemvideo.h
  5. +60 −46 src/video/gem/SDL_gemwm.c
@@ -219,6 +219,11 @@ static int do_messages(_THIS, short *message)
/* Send an internal deactivate event */
SDL_PrivateAppActive(0, SDL_APPACTIVE|SDL_APPINPUTFOCUS);
}
/* Update window title */
if (GEM_refresh_name && GEM_icon_name) {
wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_icon_name)>>16),(short)(((unsigned long)GEM_icon_name) & 0xffff),0,0);
GEM_refresh_name = SDL_FALSE;
}
break;
case WM_UNICONIFY:
wind_set(message[3],WF_UNICONIFY,message[4],message[5],message[6],message[7]);
@@ -227,6 +232,10 @@ static int do_messages(_THIS, short *message)
/* Send an internal activate event */
SDL_PrivateAppActive(1, SDL_APPACTIVE);
}
if (GEM_refresh_name && GEM_title_name) {
wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_title_name)>>16),(short)(((unsigned long)GEM_title_name) & 0xffff),0,0);
GEM_refresh_name = SDL_FALSE;
}
break;
case WM_SIZED:
wind_set (message[3], WF_CURRXYWH, message[4], message[5], message[6], message[7]);
@@ -43,6 +43,8 @@ static char rcsid =

/* Defines */

/*#define DEBUG_VIDEO_GEM 1*/

#define MAXCURWIDTH 16
#define MAXCURHEIGHT 16

@@ -102,36 +104,46 @@ WMcursor *GEM_CreateWMCursor(_THIS,
new_mform->mf_fg = 0;
new_mform->mf_bg = 1;

for (i=0;i<MAXCURHEIGHT;i++)
{
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++)
{
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++)
{
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;
}

0 comments on commit d5c17ce

Please sign in to comment.