diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-03-29 10:35:00 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-03-29 10:35:00 +0000 |
| commit | 941901e273319ce152523af7fa079a6f5cf89d68 (patch) | |
| tree | 9d70b82fa54d81607a0022f14a0518c47805a796 /src/fl_cursor.cxx | |
| parent | b77071a3de3593ea482aa7ea0a442c7fc888a2e2 (diff) | |
OS X: removed all Carbon and Quickdraw references. Starting with 1.3, we only support Cocoa and Quartz.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7351 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_cursor.cxx')
| -rw-r--r-- | src/fl_cursor.cxx | 117 |
1 files changed, 0 insertions, 117 deletions
diff --git a/src/fl_cursor.cxx b/src/fl_cursor.cxx index 14b3cbb85..b1d5c3e87 100644 --- a/src/fl_cursor.cxx +++ b/src/fl_cursor.cxx @@ -134,7 +134,6 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color c1, Fl_Color c2) { # error "Either __LITTLE_ENDIAN__ or __BIG_ENDIAN__ must be defined" #endif -#ifdef __APPLE_COCOA__ extern void *MACSetCursor(Fl_Cursor c); extern Fl_Offscreen fl_create_offscreen_with_alpha(int w, int h); @@ -241,122 +240,6 @@ void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) { #else -static Cursor crsrHAND = -{ - { E(0x0600), E(0x0900), E(0x0900), E(0x0900), E(0x09C0), E(0x0938), E(0x6926), E(0x9805), - E(0x8801), E(0x4801), E(0x2002), E(0x2002), E(0x1004), E(0x0804), E(0x0408), E(0x0408) }, - { E(0x0600), E(0x0F00), E(0x0F00), E(0x0F00), E(0x0FC0), E(0x0FF8), E(0x6FFE), E(0xFFFF), - E(0xFFFF), E(0x7FFF), E(0x3FFE), E(0x3FFE), E(0x1FFC), E(0x0FFC), E(0x07F8), E(0x07F8) }, - { 1, 5 } // Hotspot: ( y, x ) -}, *crsrHANDptr = &crsrHAND; -static Cursor crsrHELP = -{ - { E(0x0000), E(0x4000), E(0x6000), E(0x7000), E(0x783C), E(0x7C7E), E(0x7E66), E(0x7F06), - E(0x7F8C), E(0x7C18), E(0x6C18), E(0x4600), E(0x0618), E(0x0318), E(0x0300), E(0x0000) }, - { E(0xC000), E(0xE000), E(0xF000), E(0xF83C), E(0xFC7E), E(0xFEFF), E(0xFFFF), E(0xFFFF), - E(0xFFFE), E(0xFFFC), E(0xFE3C), E(0xEF3C), E(0xCF3C), E(0x07BC), E(0x0798), E(0x0380) }, - { 1, 1 } -}, *crsrHELPptr = &crsrHELP; -static Cursor crsrMOVE = -{ - { E(0x0000), E(0x0180), E(0x03C0), E(0x07E0), E(0x07E0), E(0x1998), E(0x399C), E(0x7FFE), - E(0x7FFE), E(0x399C), E(0x1998), E(0x07E0), E(0x07E0), E(0x03C0), E(0x0180), E(0x0000) }, - { E(0x0180), E(0x03C0), E(0x07E0), E(0x0FF0), E(0x1FF8), E(0x3FFC), E(0x7FFE), E(0xFFFF), - E(0xFFFF), E(0x7FFE), E(0x3FFC), E(0x1FF8), E(0x0FF0), E(0x07E0), E(0x03C0), E(0x0180) }, - { 8, 8 } -}, *crsrMOVEptr = &crsrMOVE; -static Cursor crsrNS = -{ - { E(0x0000), E(0x0180), E(0x03C0), E(0x07E0), E(0x0FF0), E(0x0180), E(0x0180), E(0x0180), - E(0x0180), E(0x0180), E(0x0180), E(0x0FF0), E(0x07E0), E(0x03C0), E(0x0180), E(0x0000) }, - { E(0x0180), E(0x03C0), E(0x07E0), E(0x0FF0), E(0x1FF8), E(0x1FF8), E(0x03C0), E(0x03C0), - E(0x03C0), E(0x03C0), E(0x1FF8), E(0x1FF8), E(0x0FF0), E(0x07E0), E(0x03C0), E(0x0180) }, - { 8, 8 } -}, *crsrNSptr = &crsrNS; -static Cursor crsrWE = -{ - { E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0810), E(0x1818), E(0x381C), E(0x7FFE), - E(0x7FFE), E(0x381C), E(0x1818), E(0x0810), E(0x0000), E(0x0000), E(0x0000), E(0x0000) }, - { E(0x0000), E(0x0000), E(0x0000), E(0x0C30), E(0x1C38), E(0x3C3C), E(0x7FFE), E(0xFFFF), - E(0xFFFF), E(0x7FFE), E(0x3C3C), E(0x1C38), E(0x0C30), E(0x0000), E(0x0000), E(0x0000) }, - { 8, 8 } -}, *crsrWEptr = &crsrWE; -static Cursor crsrNWSE = -{ - { E(0x0000), E(0x7E00), E(0x7C00), E(0x7800), E(0x7C00), E(0x6E00), E(0x4710), E(0x03B0), - E(0x01F0), E(0x00F0), E(0x01F0), E(0x03F0), E(0x0000), E(0x0000), E(0x0000), E(0x0000) }, - { E(0xFF00), E(0xFF00), E(0xFE00), E(0xFC00), E(0xFE00), E(0xFF18), E(0xEFB8), E(0xC7F8), - E(0x03F8), E(0x01F8), E(0x03F8), E(0x07F8), E(0x07F8), E(0x0000), E(0x0000), E(0x0000) }, - { 8, 8 } -}, *crsrNWSEptr = &crsrNWSE; -static Cursor crsrNESW = -{ - { E(0x0000), E(0x03F0), E(0x01F0), E(0x00F0), E(0x01F0), E(0x03B0), E(0x4710), E(0x6E00), - E(0x7C00), E(0x7800), E(0x7C00), E(0x7E00), E(0x0000), E(0x0000), E(0x0000), E(0x0000) }, - { E(0x07F8), E(0x07F8), E(0x03F8), E(0x01F8), E(0x03F8), E(0xC7F8), E(0xEFB8), E(0xFF18), - E(0xFE00), E(0xFC00), E(0xFE00), E(0xFF00), E(0xFF00), E(0x0000), E(0x0000), E(0x0000) }, - { 8, 8 } -}, *crsrNESWptr = &crsrNESW; -static Cursor crsrNONE = -{ - { E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), - E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000) }, - { E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), - E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000), E(0x0000) }, - { 0, 0 } -}, *crsrNONEptr = &crsrNONE; -static Cursor crsrARROW = -{ - { E(0x0000), E(0x4000), E(0x6000), E(0x7000), E(0x7800), E(0x7C00), E(0x7E00), E(0x7F00), - E(0x7F80), E(0x7C00), E(0x6C00), E(0x4600), E(0x0600), E(0x0300), E(0x0300), E(0x0000) }, - { E(0xC000), E(0xE000), E(0xF000), E(0xF800), E(0xFC00), E(0xFE00), E(0xFF00), E(0xFF80), - E(0xFFC0), E(0xFFC0), E(0xFE00), E(0xEF00), E(0xCF00), E(0x0780), E(0x0780), E(0x0380) }, - { 1, 1 } -}, *crsrARROWptr = &crsrARROW; - -#undef E - -void Fl_Window::cursor(Fl_Cursor c, Fl_Color, Fl_Color) { - if (c == FL_CURSOR_DEFAULT) { - c = cursor_default; - } - CursHandle icrsr = fl_default_cursor; - switch (c) { - case FL_CURSOR_CROSS: icrsr = GetCursor( crossCursor ); break; - case FL_CURSOR_WAIT: icrsr = GetCursor( watchCursor ); break; - case FL_CURSOR_INSERT: icrsr = GetCursor( iBeamCursor ); break; - case FL_CURSOR_N: - case FL_CURSOR_S: - case FL_CURSOR_NS: icrsr = &crsrNSptr; break; - case FL_CURSOR_HELP: icrsr = &crsrHELPptr; break; - case FL_CURSOR_HAND: icrsr = &crsrHANDptr; break; - case FL_CURSOR_MOVE: icrsr = &crsrMOVEptr; break; - case FL_CURSOR_NE: - case FL_CURSOR_SW: - case FL_CURSOR_NESW: icrsr = &crsrNESWptr; break; - case FL_CURSOR_E: - case FL_CURSOR_W: - case FL_CURSOR_WE: icrsr = &crsrWEptr; break; - case FL_CURSOR_SE: - case FL_CURSOR_NW: - case FL_CURSOR_NWSE: icrsr = &crsrNWSEptr; break; - case FL_CURSOR_NONE: icrsr = &crsrNONEptr; break; - case FL_CURSOR_ARROW: icrsr = &crsrARROWptr; break; - case FL_CURSOR_DEFAULT: - default: break; - } - if (icrsr) { // make sure we have a non null icrsr before updating cursor state - SetCursor( *icrsr ); - if (i) { - i->cursor = icrsr; - } - } -} - -#endif //__APPLE_COCOA__ - -#else - // I like the MSWindows resize cursors, so I duplicate them here: #define CURSORSIZE 16 |
