mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 23:56:55 +08:00
Fluid: avoid bad function pointer casting warning in Clang 17.
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ extern void exit_cb(class Fl_Widget *,void *); // TODO: remove this
|
|||||||
extern void toggle_widgetbin_cb(Fl_Widget *, void *);
|
extern void toggle_widgetbin_cb(Fl_Widget *, void *);
|
||||||
extern void menu_file_save_cb(Fl_Widget *, void *arg);
|
extern void menu_file_save_cb(Fl_Widget *, void *arg);
|
||||||
extern void menu_file_open_history_cb(Fl_Widget *, void *v);
|
extern void menu_file_open_history_cb(Fl_Widget *, void *v);
|
||||||
extern void align_widget_cb(Fl_Widget *, long);
|
extern void align_widget_cb(Fl_Widget *, void*);
|
||||||
|
|
||||||
#endif // FLUID_APP_MENU_H
|
#endif // FLUID_APP_MENU_H
|
||||||
|
|
||||||
|
|||||||
@@ -140,11 +140,11 @@ void select_layout_preset_cb(Fl_Widget *, void *user_data) {
|
|||||||
Fluid.layout_list.update_dialogs();
|
Fluid.layout_list.update_dialogs();
|
||||||
}
|
}
|
||||||
|
|
||||||
void edit_layout_preset_cb(Fl_Button *w, long user_data) {
|
void edit_layout_preset_cb(Fl_Button *w, void *user_data) {
|
||||||
int index = (int)w->argument();
|
int index = (int)w->argument();
|
||||||
assert(index >= 0);
|
assert(index >= 0);
|
||||||
assert(index < 3);
|
assert(index < 3);
|
||||||
if (user_data == (long)(fl_intptr_t)LOAD) {
|
if (user_data == LOAD) {
|
||||||
w->value(Fluid.layout_list.current_preset() == index);
|
w->value(Fluid.layout_list.current_preset() == index);
|
||||||
} else {
|
} else {
|
||||||
Fluid.layout_list.current_preset(index);
|
Fluid.layout_list.current_preset(index);
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ Function {make_settings_window()} {open
|
|||||||
xywh {10 10 320 530} selection_color 12 labelsize 11 labelcolor 255 resizable
|
xywh {10 10 320 530} selection_color 12 labelsize 11 labelcolor 255 resizable
|
||||||
} {
|
} {
|
||||||
Fl_Group w_settings_general_tab {
|
Fl_Group w_settings_general_tab {
|
||||||
label General open
|
label General open selected
|
||||||
scale_image {36 24} image {../icons/general_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 resizable
|
scale_image {36 24} image {../icons/general_64.png} compress_image 1 xywh {10 60 320 480} labelsize 11 resizable
|
||||||
} {
|
} {
|
||||||
Fl_Group {} {
|
Fl_Group {} {
|
||||||
@@ -207,7 +207,7 @@ Function {make_settings_window()} {open
|
|||||||
} {
|
} {
|
||||||
Fl_Choice scheme_choice {
|
Fl_Choice scheme_choice {
|
||||||
label {Scheme: }
|
label {Scheme: }
|
||||||
callback {Fluid.set_scheme(o->text(o->value()));} open selected
|
callback {Fluid.set_scheme(o->text(o->value()));} open
|
||||||
xywh {120 78 120 25} down_box BORDER_BOX labelfont 1 labelsize 11
|
xywh {120 78 120 25} down_box BORDER_BOX labelfont 1 labelsize 11
|
||||||
code0 {Fluid.init_scheme();}
|
code0 {Fluid.init_scheme();}
|
||||||
class Fl_Scheme_Choice
|
class Fl_Scheme_Choice
|
||||||
@@ -602,19 +602,19 @@ Fluid.layout_list.update_dialogs();}
|
|||||||
} {
|
} {
|
||||||
Fl_Button {preset_choice[0]} {
|
Fl_Button {preset_choice[0]} {
|
||||||
label Application
|
label Application
|
||||||
user_data 0 user_data_type long
|
user_data 0
|
||||||
callback edit_layout_preset_cb
|
callback edit_layout_preset_cb
|
||||||
xywh {85 107 78 20} type Radio value 1 selection_color 45 labelsize 11 compact 1
|
xywh {85 107 78 20} type Radio value 1 selection_color 45 labelsize 11 compact 1
|
||||||
}
|
}
|
||||||
Fl_Button {preset_choice[1]} {
|
Fl_Button {preset_choice[1]} {
|
||||||
label Dialog
|
label Dialog
|
||||||
user_data 1 user_data_type long
|
user_data 1
|
||||||
callback edit_layout_preset_cb
|
callback edit_layout_preset_cb
|
||||||
xywh {163 107 79 20} type Radio selection_color 45 labelsize 11 compact 1
|
xywh {163 107 79 20} type Radio selection_color 45 labelsize 11 compact 1
|
||||||
}
|
}
|
||||||
Fl_Button {preset_choice[2]} {
|
Fl_Button {preset_choice[2]} {
|
||||||
label Toolbox
|
label Toolbox
|
||||||
user_data 2 user_data_type long
|
user_data 2
|
||||||
callback edit_layout_preset_cb
|
callback edit_layout_preset_cb
|
||||||
xywh {242 107 78 20} type Radio selection_color 45 labelsize 11 compact 1
|
xywh {242 107 78 20} type Radio selection_color 45 labelsize 11 compact 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ extern Fl_Choice *layout_choice;
|
|||||||
#include <FL/Fl_Menu_Button.H>
|
#include <FL/Fl_Menu_Button.H>
|
||||||
extern Fl_Menu_Button *w_layout_menu;
|
extern Fl_Menu_Button *w_layout_menu;
|
||||||
#include <FL/Fl_Native_File_Chooser.H>
|
#include <FL/Fl_Native_File_Chooser.H>
|
||||||
extern void edit_layout_preset_cb(Fl_Button*, long);
|
extern void edit_layout_preset_cb(Fl_Button*, void*);
|
||||||
extern Fl_Button *preset_choice[3];
|
extern Fl_Button *preset_choice[3];
|
||||||
#include <FL/Fl_Value_Input.H>
|
#include <FL/Fl_Value_Input.H>
|
||||||
extern Fl_Menu_Item fontmenu_w_default[];
|
extern Fl_Menu_Item fontmenu_w_default[];
|
||||||
|
|||||||
@@ -31,9 +31,10 @@
|
|||||||
#define BREAK_ON_FIRST break
|
#define BREAK_ON_FIRST break
|
||||||
//#define BREAK_ON_FIRST
|
//#define BREAK_ON_FIRST
|
||||||
|
|
||||||
void align_widget_cb(Fl_Widget*, long how)
|
void align_widget_cb(Fl_Widget*, void *user_data)
|
||||||
{
|
{
|
||||||
const int max = 32768, min = -32768;
|
const int max = 32768, min = -32768;
|
||||||
|
int how = (int)(fl_intptr_t)(user_data);
|
||||||
int left, right, top, bot, wdt, hgt, n;
|
int left, right, top, bot, wdt, hgt, n;
|
||||||
Node *o;
|
Node *o;
|
||||||
int changed = 0;
|
int changed = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user