Fix Windows 64-bit compilation warnings (STR #2813).
Thanks to Csaba for providing a patch. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10670 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
33f61316fc
commit
f05b677a4b
@ -240,7 +240,7 @@ struct FL_EXPORT Fl_Menu_Item {
|
||||
for the menu item's callback function.
|
||||
\see Fl_Callback_p Fl_MenuItem::callback() const
|
||||
*/
|
||||
void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)p;}
|
||||
void callback(Fl_Callback1*c, long p=0) {callback_=(Fl_Callback*)c; user_data_=(void*)(fl_intptr_t)p;}
|
||||
|
||||
/**
|
||||
Gets the user_data() argument that is sent to the callback function.
|
||||
@ -264,7 +264,7 @@ struct FL_EXPORT Fl_Menu_Item {
|
||||
and stores it in the menu item's userdata() member.
|
||||
This may not be portable to some machines.
|
||||
*/
|
||||
void argument(long v) {user_data_ = (void*)v;}
|
||||
void argument(long v) {user_data_ = (void*)(fl_intptr_t)v;}
|
||||
|
||||
/** Gets what key combination shortcut will trigger the menu item. */
|
||||
int shortcut() const {return shortcut_;}
|
||||
@ -394,7 +394,7 @@ struct FL_EXPORT Fl_Menu_Item {
|
||||
the callback.
|
||||
You must first check that callback() is non-zero before calling this.
|
||||
*/
|
||||
void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)arg);}
|
||||
void do_callback(Fl_Widget* o,long arg) const {callback_(o, (void*)(fl_intptr_t)arg);}
|
||||
|
||||
// back-compatibility, do not use:
|
||||
|
||||
|
||||
@ -584,7 +584,7 @@ public:
|
||||
\param[in] cb new callback
|
||||
\param[in] p user data
|
||||
*/
|
||||
void callback(Fl_Callback1*cb, long p=0) {callback_=(Fl_Callback*)cb; user_data_=(void*)p;}
|
||||
void callback(Fl_Callback1*cb, long p=0) {callback_=(Fl_Callback*)cb; user_data_=(void*)(fl_intptr_t)p;}
|
||||
|
||||
/** Gets the user data for this widget.
|
||||
Gets the current user data (void *) argument that is passed to the callback function.
|
||||
@ -606,7 +606,7 @@ public:
|
||||
\todo The user data value must be implemented using \em intptr_t or similar
|
||||
to avoid 64-bit machine incompatibilities.
|
||||
*/
|
||||
void argument(long v) {user_data_ = (void*)v;}
|
||||
void argument(long v) {user_data_ = (void*)(fl_intptr_t)v;}
|
||||
|
||||
/** Returns the conditions under which the callback is called.
|
||||
|
||||
@ -856,7 +856,7 @@ public:
|
||||
\param[in] arg call the callback with \p arg as the user data argument
|
||||
\see callback()
|
||||
*/
|
||||
void do_callback(Fl_Widget* o,long arg) {do_callback(o,(void*)arg);}
|
||||
void do_callback(Fl_Widget* o,long arg) {do_callback(o,(void*)(fl_intptr_t)arg);}
|
||||
|
||||
// Causes a widget to invoke its callback function with arbitrary arguments.
|
||||
// Documentation and implementation in Fl_Widget.cxx
|
||||
|
||||
Loading…
Reference in New Issue
Block a user