comparison src/video/gem/SDL_gemmouse.c @ 736:028e03e273c8

Use new C2P routine + corrections for iconification window
author Patrice Mandin <patmandin@gmail.com>
date Wed, 12 Nov 2003 18:49:29 +0000
parents 189a6a3416c7
children b8d311d90021
comparison
equal deleted inserted replaced
735:abec2a842d11 736:028e03e273c8
40 #include "SDL_events_c.h" 40 #include "SDL_events_c.h"
41 #include "SDL_cursor_c.h" 41 #include "SDL_cursor_c.h"
42 #include "SDL_gemmouse_c.h" 42 #include "SDL_gemmouse_c.h"
43 43
44 /* Defines */ 44 /* Defines */
45
46 /*#define DEBUG_VIDEO_GEM 1*/
45 47
46 #define MAXCURWIDTH 16 48 #define MAXCURWIDTH 16
47 #define MAXCURHEIGHT 16 49 #define MAXCURHEIGHT 16
48 50
49 /* The implementation dependent data for the window manager cursor */ 51 /* The implementation dependent data for the window manager cursor */
100 new_mform->mf_yhot = hot_y; 102 new_mform->mf_yhot = hot_y;
101 new_mform->mf_nplanes = 1; 103 new_mform->mf_nplanes = 1;
102 new_mform->mf_fg = 0; 104 new_mform->mf_fg = 0;
103 new_mform->mf_bg = 1; 105 new_mform->mf_bg = 1;
104 106
105 for (i=0;i<MAXCURHEIGHT;i++) 107 for (i=0;i<MAXCURHEIGHT;i++) {
106 {
107 new_mform->mf_mask[i]=0; 108 new_mform->mf_mask[i]=0;
108 new_mform->mf_data[i]=0; 109 new_mform->mf_data[i]=0;
109 } 110 }
110 111
111 if (w<=8) { 112 if (w<=8) {
112 for (i=0;i<h;i++) 113 for (i=0;i<h;i++) {
113 {
114 new_mform->mf_mask[i]= mask[i]<<8; 114 new_mform->mf_mask[i]= mask[i]<<8;
115 new_mform->mf_data[i]= data[i]<<8; 115 new_mform->mf_data[i]= data[i]<<8;
116 } 116 }
117 } else { 117 } else {
118 for (i=0;i<h;i++) 118 for (i=0;i<h;i++) {
119 {
120 new_mform->mf_mask[i]= mask[i<<1]<<8 | mask[(i<<1)+1]; 119 new_mform->mf_mask[i]= mask[i<<1]<<8 | mask[(i<<1)+1];
121 new_mform->mf_data[i]= data[i<<1]<<8 | data[(i<<1)+1]; 120 new_mform->mf_data[i]= data[i<<1]<<8 | data[(i<<1)+1];
122 } 121 }
123 } 122 }
123
124 #ifdef DEBUG_VIDEO_GEM
125 for (i=0; i<h ;i++) {
126 printf("sdl:video:gem: cursor, line %d = 0x%04x\n", i, new_mform->mf_mask[i]);
127 }
128
129 printf("sdl:video:gem: CreateWMCursor(): done\n");
130 #endif
124 131
125 return cursor; 132 return cursor;
126 } 133 }
127 134
128 int GEM_ShowWMCursor(_THIS, WMcursor *cursor) 135 int GEM_ShowWMCursor(_THIS, WMcursor *cursor)
129 { 136 {
137 /*
130 if (cursor == NULL) { 138 if (cursor == NULL) {
131 graf_mouse(M_OFF, NULL); 139 graf_mouse(M_OFF, NULL);
132 } else if (cursor->mform_p) { 140 } else if (cursor->mform_p) {
133 graf_mouse(USER_DEF, cursor->mform_p); 141 graf_mouse(USER_DEF, cursor->mform_p);
134 } 142 }
143 */
144 #ifdef DEBUG_VIDEO_GEM
145 printf("sdl:video:gem: ShowWMCursor(0x%08x)\n", (long) cursor);
146 #endif
135 147
136 return 1; 148 return 1;
137 } 149 }
138 150
139 #if 0 151 #if 0