summaryrefslogtreecommitdiff
path: root/FL
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2010-03-29 10:35:00 +0000
committerMatthias Melcher <fltk@matthiasm.com>2010-03-29 10:35:00 +0000
commit941901e273319ce152523af7fa079a6f5cf89d68 (patch)
tree9d70b82fa54d81607a0022f14a0518c47805a796 /FL
parentb77071a3de3593ea482aa7ea0a442c7fc888a2e2 (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 'FL')
-rw-r--r--FL/Fl_Native_File_Chooser_MAC.H37
-rw-r--r--FL/Fl_Sys_Menu_Bar.H2
-rw-r--r--FL/mac.H33
3 files changed, 0 insertions, 72 deletions
diff --git a/FL/Fl_Native_File_Chooser_MAC.H b/FL/Fl_Native_File_Chooser_MAC.H
index a127c184f..8697281b7 100644
--- a/FL/Fl_Native_File_Chooser_MAC.H
+++ b/FL/Fl_Native_File_Chooser_MAC.H
@@ -57,20 +57,10 @@ public:
NEW_FOLDER = 0x0002, // Show 'New Folder' icon (if supported)
PREVIEW = 0x0004, // enable preview mode
};
-#ifndef __APPLE_COCOA__
-protected:
- NavDialogCreationOptions _opts; // file navigation options
-#endif
private:
int _btype; // kind-of browser to show()
int _options; // general options
-#ifdef __APPLE_COCOA__
void *_panel;
-#else
- NavDialogRef _ref; // file navigation reference
- NavActionState _keepstate; // holds button permissions
- NavMenuItemSpec _tempitem; // Popup menu selection
-#endif
char **_pathnames; // array of pathnames
int _tpathnames; // total pathnames
char *_directory; // default pathname to use
@@ -92,41 +82,14 @@ private:
int _filt_value; // index of the selected filter
char *_errmsg; // error message
-#ifndef __APPLE_COCOA__
- // PRIVATE CLASS TO HANDLE NAVIGATION DIALOG REPLY STRUCT
- // Class-ified, mainly to ensure proper cleanup.
- //
- class NavReply {
- int _valid_reply;
- NavReplyRecord _reply;
- public:
- NavReply();
- ~NavReply();
- int get_reply(NavDialogRef& ref);
- int get_saveas_basename(char *s, int slen);
- int get_dirname(char *s, int slen);
- int get_pathnames(char **&pathnames, int& tpathnames);
- };
-#endif
// Private methods
void errmsg(const char *msg);
void clear_pathnames();
void set_single_pathname(const char *s);
-#ifdef __APPLE_COCOA__
int get_saveas_basename(void);
-#else
- int get_saveas_basename(NavDialogRef& ref);
- int get_pathnames(NavDialogRef& ref);
- static void event_handler(NavEventCallbackMessage callBackSelector,
- NavCBRecPtr cbparm, void *data);
-#endif
void clear_filters();
void add_filter(const char *, const char *);
void parse_filter(const char *from);
-#ifndef __APPLE_COCOA__
- static Boolean filter_proc_cb(AEDesc *, void *, void *, NavFilterModes);
- Boolean filter_proc_cb2(AEDesc*, void*, void*, NavFilterModes);
-#endif
int post();
public:
diff --git a/FL/Fl_Sys_Menu_Bar.H b/FL/Fl_Sys_Menu_Bar.H
index 87a4db8e3..5ecea0786 100644
--- a/FL/Fl_Sys_Menu_Bar.H
+++ b/FL/Fl_Sys_Menu_Bar.H
@@ -53,7 +53,6 @@ public:
fl_sys_menu_bar = this;
}
void menu(const Fl_Menu_Item *m);
-#if defined(__APPLE_COCOA__) || defined(FL_DOXYGEN)
int add(const char* label, int shortcut, Fl_Callback*, void *user_data=0, int flags=0);
void remove(int n);
void replace(int rank, const char *name);
@@ -63,7 +62,6 @@ public:
// function doMenuOrItemOperation is in file Fl_cocoa.mm because it contains objective-c code
static void *doMenuOrItemOperation( menuOrItemOperation operation, ...);
#endif
-#endif
};
#else
diff --git a/FL/mac.H b/FL/mac.H
index 6b204db2c..eda99be37 100644
--- a/FL/mac.H
+++ b/FL/mac.H
@@ -72,8 +72,6 @@ typedef float CGFloat;
struct XPoint { int x, y; };
struct XRectangle {int x, y, width, height;};
-#ifdef __APPLE_COCOA__
-
typedef void *Window; // this is really a pter to the subclass FLWindow of NSWindow
typedef struct flCocoaRegion {
int count;
@@ -99,25 +97,6 @@ extern void *fl_system_menu;
typedef CGContextRef Fl_Offscreen;
typedef CGImageRef Fl_Bitmask;
-#else
-
-typedef WindowRef Window;
-typedef RgnHandle Fl_Region;
-inline Fl_Region XRectangleRegion(int x, int y, int w, int h) {
- Fl_Region R = NewRgn();
- SetRectRgn(R, x, y, x+w, y+h);
- return R;
-}
-inline void XDestroyRegion(Fl_Region r) {
- DisposeRgn(r);
-}
-extern CursHandle fl_default_cursor;
-extern Handle fl_system_menu;
-typedef GWorldPtr Fl_Offscreen;
-typedef GWorldPtr Fl_Bitmask; // Carbon requires a 1-bit GWorld instead of a BitMap
-
-#endif
-
void fl_clip_region(Fl_Region);
# include "Fl_Window.H"
@@ -135,11 +114,7 @@ public:
Fl_X *next; // linked tree to support subwindows
Fl_X *xidChildren, *xidNext; // more subwindow tree
int wait_for_expose;
-#ifdef __APPLE_COCOA__
void *cursor; // is really NSCursor*
-#else
- CursHandle cursor;
-#endif
static Fl_X* first;
static Fl_X* i(const Fl_Window* w) {return w->i;}
static int fake_X_wm(const Fl_Window*,int&,int&,int&,int&,int&);
@@ -154,18 +129,12 @@ public:
static void q_end_image();
};
-#ifdef __APPLE_COCOA__
extern void MacDestroyWindow(Fl_Window*,void *);
extern void MacMapWindow(Fl_Window*,void *);
extern void MacUnmapWindow(Fl_Window*,void *);
extern WindowRef MACwindowRef(Fl_Window *w);
extern Fl_Region MacRectRegionIntersect(Fl_Region current, int x,int y,int w, int h);
extern void MacCollapseWindow(Window w);
-#else
-extern void MacDestroyWindow(Fl_Window*,WindowPtr);
-extern void MacMapWindow(Fl_Window*,WindowPtr);
-extern void MacUnmapWindow(Fl_Window*,WindowPtr);
-#endif
extern int MacUnlinkWindow(Fl_X*,Fl_X*start=0L);
@@ -204,7 +173,6 @@ extern void fl_open_callback(void (*cb)(const char *));
extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b);
#endif // FL_DOXYGEN
-#if defined(__APPLE_COCOA__) || defined(FL_DOXYGEN)
/** \defgroup group_macosx Mac OS X-specific functions
@{ */
@@ -219,7 +187,6 @@ extern FL_EXPORT int fl_parse_color(const char* p, uchar& r, uchar& g, uchar& b)
*/
extern void fl_mac_set_about( Fl_Callback *cb, void *user_data, int shortcut = 0);
/** @} */
-#endif
//
// End of "$Id$".