diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/arc.cxx | 2 | ||||
| -rw-r--r-- | test/cursor.cxx | 2 | ||||
| -rw-r--r-- | test/curve.cxx | 2 | ||||
| -rw-r--r-- | test/fractals.cxx | 6 | ||||
| -rw-r--r-- | test/input.cxx | 2 | ||||
| -rw-r--r-- | test/keyboard.cxx | 4 | ||||
| -rw-r--r-- | test/line_style.cxx | 6 | ||||
| -rw-r--r-- | test/scroll.cxx | 4 | ||||
| -rw-r--r-- | test/table.cxx | 6 | ||||
| -rw-r--r-- | test/tree.fl | 2 |
10 files changed, 18 insertions, 18 deletions
diff --git a/test/arc.cxx b/test/arc.cxx index 69854eda5..77d37a96f 100644 --- a/test/arc.cxx +++ b/test/arc.cxx @@ -66,7 +66,7 @@ Drawing *d; void slider_cb(Fl_Widget* o, void* v) { Fl_Slider* s = (Fl_Slider*)o; - args[long(v)] = s->value(); + args[fl_intptr_t(v)] = s->value(); d->redraw(); } diff --git a/test/cursor.cxx b/test/cursor.cxx index 75f645241..3f3ab0c49 100644 --- a/test/cursor.cxx +++ b/test/cursor.cxx @@ -39,7 +39,7 @@ Fl_Cursor cursor = FL_CURSOR_DEFAULT; Fl_Hor_Value_Slider *cursor_slider; void choice_cb(Fl_Widget *, void *v) { - cursor = (Fl_Cursor)(long)v; + cursor = (Fl_Cursor)(fl_intptr_t)v; cursor_slider->value(cursor); fl_cursor(cursor,fg,bg); } diff --git a/test/curve.cxx b/test/curve.cxx index db9b28c20..f69f7241b 100644 --- a/test/curve.cxx +++ b/test/curve.cxx @@ -83,7 +83,7 @@ void points_cb(Fl_Widget* o, void*) { void slider_cb(Fl_Widget* o, void* v) { Fl_Slider* s = (Fl_Slider*)o; - args[long(v)] = s->value(); + args[fl_intptr_t(v)] = s->value(); d->redraw(); } diff --git a/test/fractals.cxx b/test/fractals.cxx index d9bf34468..d0167464b 100644 --- a/test/fractals.cxx +++ b/test/fractals.cxx @@ -765,11 +765,11 @@ void MenuInit(void) /***************************************************************/ // FLTK-style callbacks to Glut menu callback translators: -void setlevel(Fl_Widget*, void *value) {setlevel(long(value));} +void setlevel(Fl_Widget*, void *value) {setlevel(fl_intptr_t(value));} -void choosefract(Fl_Widget*, void *value) {choosefract(long(value));} +void choosefract(Fl_Widget*, void *value) {choosefract(fl_intptr_t(value));} -void handlemenu(Fl_Widget*, void *value) {handlemenu(long(value));} +void handlemenu(Fl_Widget*, void *value) {handlemenu(fl_intptr_t(value));} #include <FL/Fl_Button.H> #include <FL/Fl_Group.H> diff --git a/test/input.cxx b/test/input.cxx index 35322c3f6..428a65cb1 100644 --- a/test/input.cxx +++ b/test/input.cxx @@ -65,7 +65,7 @@ void button_cb(Fl_Widget *,void *) { void color_cb(Fl_Widget* button, void* v) { Fl_Color c; - switch ((long)v) { + switch ((fl_intptr_t)v) { case 0: c = FL_BACKGROUND2_COLOR; break; case 1: c = FL_SELECTION_COLOR; break; default: c = FL_FOREGROUND_COLOR; break; diff --git a/test/keyboard.cxx b/test/keyboard.cxx index 0bf88cf92..2d0034899 100644 --- a/test/keyboard.cxx +++ b/test/keyboard.cxx @@ -109,14 +109,14 @@ int main(int argc, char** argv) { for (int i = 0; i < window->children(); i++) { Fl_Widget* b = window->child(i); if (b->callback() == (Fl_Callback*)key_cb) { - int i = (long)b->user_data(); + int i = b->argument(); if (!i) i = b->label()[0]; Fl_Button *btn = ((Fl_Button*)b); int state = Fl::event_key(i); if (btn->value()!=state) btn->value(state); } else if (b->callback() == (Fl_Callback*)shift_cb) { - int i = (long)b->user_data(); + int i = b->argument(); Fl_Button *btn = ((Fl_Button*)b); int state = Fl::event_state(i); if (btn->value()!=state) diff --git a/test/line_style.cxx b/test/line_style.cxx index d32a47482..c37b0a7ec 100644 --- a/test/line_style.cxx +++ b/test/line_style.cxx @@ -58,9 +58,9 @@ void test_box::draw() { dashes[3] = char(sliders[8]->value()); dashes[4] = 0; fl_line_style( - (long)(choice[0]->mvalue()->user_data()) + - (long)(choice[1]->mvalue()->user_data()) + - (long)(choice[2]->mvalue()->user_data()), + (long)(choice[0]->mvalue()->argument()) + + (long)(choice[1]->mvalue()->argument()) + + (long)(choice[2]->mvalue()->argument()), (long)(sliders[3]->value()), // width dashes); diff --git a/test/scroll.cxx b/test/scroll.cxx index 069d10f64..0cc229b5d 100644 --- a/test/scroll.cxx +++ b/test/scroll.cxx @@ -71,7 +71,7 @@ void box_cb(Fl_Widget* o, void*) { } void type_cb(Fl_Widget*, void* v) { - thescroll->type((uchar)((long)v)); + thescroll->type((uchar)((fl_intptr_t)v)); thescroll->redraw(); } @@ -87,7 +87,7 @@ Fl_Menu_Item choices[] = { }; void align_cb(Fl_Widget*, void* v) { - thescroll->scrollbar.align((uchar)((long)v)); + thescroll->scrollbar.align((uchar)((fl_intptr_t)v)); thescroll->redraw(); } diff --git a/test/table.cxx b/test/table.cxx index ec94314c6..c36713ef5 100644 --- a/test/table.cxx +++ b/test/table.cxx @@ -273,19 +273,19 @@ char *itoa(int val) void tablebox_choice_cb(Fl_Widget *w, void *data) { - G_table->table_box((Fl_Boxtype)(long)data); + G_table->table_box((Fl_Boxtype)(fl_intptr_t)data); G_table->redraw(); } void widgetbox_choice_cb(Fl_Widget *w, void *data) { - G_table->box((Fl_Boxtype)(long)data); + G_table->box((Fl_Boxtype)(fl_intptr_t)data); G_table->resize(G_table->x(), G_table->y(), G_table->w(), G_table->h()); } void type_choice_cb(Fl_Widget *w, void *data) { - G_table->type((Fl_Table_Row::TableRowSelectMode)(long)data); + G_table->type((Fl_Table_Row::TableRowSelectMode)(fl_intptr_t)data); } Fl_Menu_Item tablebox_choices[] = { diff --git a/test/tree.fl b/test/tree.fl index a184e6c91..5fec7fd60 100644 --- a/test/tree.fl +++ b/test/tree.fl @@ -152,7 +152,7 @@ Fl_Tree_Item *item = tree->callback_item(); if ( item ) { fprintf(stderr, "TREE CALLBACK: label='%s' userdata=%ld reason=%s\\n", item->label(), - (long)tree->user_data(), + (long)(fl_intptr_t)tree->user_data(), reason_as_name(tree->callback_reason())); } else { fprintf(stderr, "TREE CALLBACK: reason=%s item=(no item -- probably multiple items were changed at once)\\n", |
