Back to index

gcompris  8.2.2
cursor.h
Go to the documentation of this file.
00001 /* gcompris - cursor.h
00002  *
00003  * Copyright (C) 2002 Pascal Georges
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018  */
00019 #ifndef CURSOR_H
00020 #define CURSOR_H
00021 
00022 #include <gtk/gtk.h>
00023 
00024 #include <stdio.h>
00025 
00026 GdkCursor *gdk_cursor_new_from_data(const gchar *bits[],
00027                                 gint width, gint height,
00028                                 GdkColor *fg, GdkColor *bg,
00029                                 gint hot_x, gint hot_y);
00030 
00031 /* Bitmap data of cursor */
00032 static const gchar *big_red_arrow_cursor_bits[] = {
00033 "111111                                  ",
00034 "1000011111                              ",
00035 "1000000001111                           ",
00036 "1000000000001111                        ",
00037 "10000000000000011111                    ",
00038 "1000000000000000000111                  ",
00039 "10000000000000000000011111              ",
00040 "10000000000000000000000001111           ",
00041 "1000000000000000000000000000111         ",
00042 "10000000000000000000000000000011        ",
00043 "100000000000000000000000000000011       ",
00044 "100000000000000000000000000000001       ",
00045 "100000000000000000000000000000001       ",
00046 "100000000000000000000000000000001       ",
00047 "100000000000000000000000000000111       ",
00048 "1000000000000000000000000011111         ",
00049 "100000000000000000000000111             ",
00050 "1000000000000000000001111               ",
00051 "1000000000000000000001                  ",
00052 "1000000000000000000001                  ",
00053 "1000000000000000000001                  ",
00054 "10000000000000000000011                 ",
00055 "100000000000000000000011                ",
00056 "1000000000000000000000011               ",
00057 "10000000000000000000000011              ",
00058 "1000000000000111110000000111            ",
00059 "10000000001111   110000000011           ",
00060 " 1000000011       100000000011          ",
00061 " 110000111        1110000000011         ",
00062 "  111111            100000000011        ",
00063 "                    1000000000011       ",
00064 "                    1100000000001       ",
00065 "                     100000000001       ",
00066 "                      10000000001       ",
00067 "                      11000000001       ",
00068 "                       1000000001       ",
00069 "                       1100000011       ",
00070 "                        11000011        ",
00071 "                         110011         ",
00072 "                           11           "};
00073 
00074 static const gchar *bird_cursor_bits[] = {
00075 "        111                             ",
00076 "     11000001                           ",
00077 " 1110001000001                          ",
00078 "110000000000001                         ",
00079 "  11100000000001                        ",
00080 "     0000000000011                      ",
00081 "      100000000011111                   ",
00082 "       000000010000111                  ",
00083 "       0000000000000111                 ",
00084 "       00000010000000011                ",
00085 "       100000000000000011               ",
00086 "       0000000000000000011              ",
00087 "       10000000100000000011             ",
00088 "        0000000000000000011             ",
00089 "        10000001000000000011            ",
00090 "         0000000000000000001            ",
00091 "         10000000000000000011           ",
00092 "          00000000000000000011          ",
00093 "           0000000000000000011          ",
00094 "            000000000000000011          ",
00095 "             1000000000000000011        ",
00096 "              10000000000000011         ",
00097 "               1000000000000001         ",
00098 "                 100000000000011        ",
00099 "                  11000000111111        ",
00100 "                    100000000011        ",
00101 "                      11000000001       ",
00102 "                         10000001       ",
00103 "                            10001       ",
00104 "                              00001     ",
00105 "                              100001    ",
00106 "                               00000    ",
00107 "                               100001   ",
00108 "                               1000001  ",
00109 "                                1000001 ",
00110 "                                 0000001",
00111 "                                 0000000",
00112 "                                 1000001",
00113 "                                  10000 ",
00114 "                                   01   "}; 
00115 
00116 /* Bitmap data of a line */
00117 static const gchar *big_red_line_cursor_bits[] = {
00118 "1111111111111111111111111               ",
00119 "111111111111111111111111                ",
00120 "1100000000000000000111                  ",
00121 "11000000000000000111                    ",
00122 "110000000000000111                      ",
00123 "1100000000000111                        ",
00124 "11000000000111                          ",
00125 "110000000011                            ",
00126 "1100000000011                           ",
00127 "11000000000011                          ",
00128 "110000110000011                         ",
00129 "1100001110000011                        ",
00130 "1100011 11000011                        ",
00131 "1100011  1100011                        ",
00132 "110011    110011                        ",
00133 "110011     11111                        ",
00134 "11011                                   ",
00135 "11011                                   ",
00136 "1111              11111                 ",
00137 "1111              111111                ",
00138 "111               1100011               ",
00139 "111               11000011              ",
00140 "11                110000011             ",
00141 "1                  110000011            ",
00142 "                    110000011           ",
00143 "                     110000011          ",
00144 "                      110000011         ",
00145 "                       110000011        ",
00146 "                        110000011       ",
00147 "                         110000011      ",
00148 "                          110000011     ",
00149 "                           110000011    ",
00150 "                            110000011   ",
00151 "                             110000011  ",
00152 "                              110000011 ",
00153 "                               110000011",
00154 "                                11000011",
00155 "                                 1100011",
00156 "                                  111111",
00157 "                                   11111"};
00158 
00159 // Bitmap data of a rectangle
00160 static const gchar *big_red_rectangle_cursor_bits[] = {
00161 "1111111111111111111111111               ",
00162 "111111111111111111111111                ",
00163 "1100000000000000000111                  ",
00164 "11000000000000000111                    ",
00165 "110000000000000111                      ",
00166 "1100000000000111                        ",
00167 "11000000000111                          ",
00168 "110000000011                            ",
00169 "1100000000011                           ",
00170 "11000000000011                          ",
00171 "110000110000011                         ",
00172 "1100001110000011                        ",
00173 "1100011 11000011                        ",
00174 "1100011  1100011                        ",
00175 "110011    110011                        ",
00176 "110011     11111                        ",
00177 "11011                                   ",
00178 "11011                                   ",
00179 "1111             11111111111111111111111",
00180 "1111             11111111111111111111111",
00181 "111              11000000000000000000011",
00182 "111              110                 011",
00183 "11               110                 011",
00184 "1                110                 011",
00185 "                 110                 011",
00186 "                 110                 011",
00187 "                 110                 011",
00188 "                 110                 011",
00189 "                 110                 011",
00190 "                 110                 011",
00191 "                 110                 011",
00192 "                 110                 011",
00193 "                 110                 011",
00194 "                 110                 011",
00195 "                 110                 011",
00196 "                 110                 011",
00197 "                 110                 011",
00198 "                 11000000000000000000011",
00199 "                 11111111111111111111111",
00200 "                 11111111111111111111111"};
00201 
00202 // Bitmap data of a rectangle
00203 static const gchar *big_red_filledrectangle_cursor_bits[] = {
00204 "1111111111111111111111111               ",
00205 "111111111111111111111111                ",
00206 "1100000000000000000111                  ",
00207 "11000000000000000111                    ",
00208 "110000000000000111                      ",
00209 "1100000000000111                        ",
00210 "11000000000111                          ",
00211 "110000000011                            ",
00212 "1100000000011                           ",
00213 "11000000000011                          ",
00214 "110000110000011                         ",
00215 "1100001110000011                        ",
00216 "1100011 11000011                        ",
00217 "1100011  1100011                        ",
00218 "110011    110011                        ",
00219 "110011     11111                        ",
00220 "11011                                   ",
00221 "11011                                   ",
00222 "1111             11111111111111111111111",
00223 "1111             11111111111111111111111",
00224 "111              11000000000000000000011",
00225 "111              11000000000000000000011",
00226 "11               11000000000000000000011",
00227 "1                11000000000000000000011",
00228 "                 11000000000000000000011",
00229 "                 11000000000000000000011",
00230 "                 11000000000000000000011",
00231 "                 11000000000000000000011",
00232 "                 11000000000000000000011",
00233 "                 11000000000000000000011",
00234 "                 11000000000000000000011",
00235 "                 11000000000000000000011",
00236 "                 11000000000000000000011",
00237 "                 11000000000000000000011",
00238 "                 11000000000000000000011",
00239 "                 11000000000000000000011",
00240 "                 11000000000000000000011",
00241 "                 11000000000000000000011",
00242 "                 11111111111111111111111",
00243 "                 11111111111111111111111"};
00244 
00245 static const gchar *big_red_circle_cursor_bits[] = {
00246 "1111111111111111111111111               ",
00247 "111111111111111111111111                ",
00248 "1100000000000000000111                  ",
00249 "11000000000000000111                    ",
00250 "110000000000000111                      ",
00251 "1100000000000111                        ",
00252 "11000000000111                          ",
00253 "110000000011                            ",
00254 "1100000000011                           ",
00255 "11000000000011                          ",
00256 "110000110000011                         ",
00257 "1100001110000011                        ",
00258 "1100011 11000011                        ",
00259 "1100011  1100011                        ",
00260 "110011    110011                        ",
00261 "110011     11111                        ",
00262 "11011                                   ",
00263 "11011                                   ",
00264 "1111                      11111         ",
00265 "1111                    111111111       ",
00266 "111                   11         11     ",
00267 "111                  11           11    ",
00268 "11                  11             11   ",
00269 "1                  11               11  ",
00270 "                   11               11  ",
00271 "                  11                 11 ",
00272 "                  11                 11 ",
00273 "                 11                   11",
00274 "                 11                   11",
00275 "                 11                   11",
00276 "                  11                 11 ",
00277 "                  11                 11 ",
00278 "                   11               11  ",
00279 "                   11               11  ",
00280 "                    11             11   ",
00281 "                    11             11   ",
00282 "                     11           11    ",
00283 "                      11         11     ",
00284 "                        111111111       ",
00285 "                          11111         "};
00286 
00287 static const gchar *big_red_filledcircle_cursor_bits[] = {
00288 "1111111111111111111111111               ",
00289 "111111111111111111111111                ",
00290 "1100000000000000000111                  ",
00291 "11000000000000000111                    ",
00292 "110000000000000111                      ",
00293 "1100000000000111                        ",
00294 "11000000000111                          ",
00295 "110000000011                            ",
00296 "1100000000011                           ",
00297 "11000000000011                          ",
00298 "110000110000011                         ",
00299 "1100001110000011                        ",
00300 "1100011 11000011                        ",
00301 "1100011  1100011                        ",
00302 "110011    110011                        ",
00303 "110011     11111                        ",
00304 "11011                                   ",
00305 "11011                                   ",
00306 "1111                      11111         ",
00307 "1111                    111111111       ",
00308 "111                   1100000000011     ",
00309 "111                  110000000000011    ",
00310 "11                  11000000000000011   ",
00311 "1                  1100000000000000011  ",
00312 "                   1100000000000000011  ",
00313 "                  110000000000000000011 ",
00314 "                  110000000000000000011 ",
00315 "                 11000000000000000000011",
00316 "                 11000000000000000000011",
00317 "                 11000000000000000000011",
00318 "                  110000000000000000011 ",
00319 "                  110000000000000000011 ",
00320 "                   1100000000000000011  ",
00321 "                   1100000000000000011  ",
00322 "                    11000000000000011   ",
00323 "                    11000000000000011   ",
00324 "                     110000000000011    ",
00325 "                      1100000000011     ",
00326 "                        111111111       ",
00327 "                          11111         "};
00328 
00329 static const gchar *big_red_fill_cursor_bits[] = {
00330 "1111111111111111111111111               ",
00331 "111111111111111111111111                ",
00332 "1100000000000000000111                  ",
00333 "11000000000000000111                    ",
00334 "110000000000000111                      ",
00335 "1100000000000111                        ",
00336 "11000000000111                          ",
00337 "110000000011                            ",
00338 "1100000000011                           ",
00339 "11000000000011                          ",
00340 "110000110000011                         ",
00341 "1100001110000011                        ",
00342 "1100011 11000011        11111111        ",
00343 "1100011  1100011        11111111        ",
00344 "110011    110011        11000011        ",
00345 "110011     11111        11000011        ",
00346 "11011                   11000001        ",
00347 "11011                   11000001        ",
00348 "1111             11111111111111111111111",
00349 "1111             11111111111111111111111",
00350 "11               11000000000000000000011",
00351 "1                110                 011",
00352 "                 110                 011",
00353 "                 110                 011",
00354 "                 110                 011",
00355 "                 110000              011",
00356 "                 110 000             011",
00357 "                 110   0000          011",
00358 "                 110      0          011",
00359 "                 110000   0          011",
00360 "                 110 000  0          011",
00361 "                 110   0000          011",
00362 "                 110                 011",
00363 "                 110                 011",
00364 "                 110                 011",
00365 "                 110                 011",
00366 "                 110                 011",
00367 "                 11000000000000000000011",
00368 "                 11111111111111111111111",
00369 "                 11111111111111111111111"};
00370 
00371 static const gchar *big_red_del_cursor_bits[] = {
00372 "1111111111111111111111111               ",
00373 "111111111111111111111111                ",
00374 "1100000000000000000111                  ",
00375 "11000000000000000111                    ",
00376 "110000000000000111                      ",
00377 "1100000000000111                        ",
00378 "11000000000111                          ",
00379 "110000000011                            ",
00380 "1100000000011                           ",
00381 "11000000000011                          ",
00382 "110000110000011                         ",
00383 "1100001110000011                        ",
00384 "1100011 11000011                        ",
00385 "1100011  1100011                        ",
00386 "110011    110011                        ",
00387 "110011     11111                        ",
00388 "11011                                   ",
00389 "11011                                   ",
00390 "1111                                    ",
00391 "1111      111                 111       ",
00392 "11        1001               1001       ",
00393 "1         10001             10001       ",
00394 "           10001           10001        ",
00395 "            10001         10001         ",
00396 "             10001       10001          ",
00397 "              10001     10001           ",
00398 "               10001   10001            ",
00399 "                10001 10001             ",
00400 "                 100010001              ",
00401 "                 100000001              ",
00402 "                 100010001              ",
00403 "                10001 10001             ",
00404 "               10001   10001            ",
00405 "              10001     10001           ",
00406 "             10001       10001          ",
00407 "            10001         10001         ",
00408 "           10001           10001        ",
00409 "          10001             10001       ",
00410 "          1001               1001       ",
00411 "          111                 111       "};
00412 
00413 static const gchar *big_red_select_cursor_bits[] = {
00414 "1111111111111111111111111               ",
00415 "111111111111111111111111                ",
00416 "1100000000000000000111                  ",
00417 "11000000000000000111                    ",
00418 "110000000000000111                      ",
00419 "1100000000000111                        ",
00420 "11000000000111                          ",
00421 "110000000011                            ",
00422 "1100000000011                           ",
00423 "11000000000011                          ",
00424 "110000110000011                         ",
00425 "1100001110000011                        ",
00426 "1100011 11000011                        ",
00427 "1100011  1100011                        ",
00428 "110011    110011                        ",
00429 "110011     11111                        ",
00430 "11011                                   ",
00431 "11011               111                 ",
00432 "1111               10001                ",
00433 "1111              1000001               ",
00434 "11               100000001              ",
00435 "1               11110001111             ",
00436 "                   10001                ",
00437 "              1    10001    1           ",
00438 "             11    10001    11          ",
00439 "            101    10001    101         ",
00440 "           100111111000111111001        ",
00441 "          10000000000000000000001       ",
00442 "          10000000000000000000001       ",
00443 "          10000000000000000000001       ",
00444 "           100111111000111111001        ",
00445 "            101    10001    101         ",
00446 "             11    10001    11          ",
00447 "              1    10001    1           ",
00448 "                   10001                ",
00449 "                11110001111             ",
00450 "                 100000001              ",
00451 "                  1000001               ",
00452 "                   10001                ",
00453 "                    111                 "};
00454 
00455 #endif