├── .gitignore ├── Makefile.in ├── README.md ├── config.h.in ├── configure.ac ├── configure.scan ├── examples ├── Makefile.in ├── arc.c ├── bitmap.c ├── boxtype.c ├── browser.c ├── button.c ├── buttons.c ├── clock.c ├── colbrowser.c ├── color_chooser.c ├── cube.c ├── cursor.c ├── curve.c ├── device.c ├── doublebuffer.c ├── file_chooser.c ├── fonts.c ├── howto-add_fd-and-popen.c ├── howto-browser-with-icons.c ├── howto-drag-and-drop.c ├── howto-parse-args.c ├── howto-text-over-image-button.c ├── list_visuals.c ├── list_visuals.h ├── make_button_with_callback.c ├── make_input.c ├── make_tree.c ├── make_window.c ├── make_window_fullscreen.c ├── make_window_hide.c ├── make_window_resize.c ├── make_window_with_callback.c ├── make_window_with_width_height.c ├── menubar-add.c ├── nativefilechooser-simple-app.c ├── pixmaps │ ├── black_1.xbm │ ├── black_2.xbm │ ├── black_3.xbm │ ├── black_4.xbm │ ├── blackking_1.xbm │ ├── blackking_2.xbm │ ├── blackking_3.xbm │ ├── blackking_4.xbm │ ├── blast.xpm │ ├── block.xcf.gz │ ├── blue.xpm │ ├── blue_bomb.xpm │ ├── cyan.xpm │ ├── cyan_bomb.xpm │ ├── gray.xpm │ ├── gray_bomb.xpm │ ├── green.xpm │ ├── green_bomb.xpm │ ├── magenta.xpm │ ├── magenta_bomb.xpm │ ├── porsche.xpm │ ├── porsche1.xpm │ ├── red.xpm │ ├── red_bomb.xpm │ ├── srs.xbm │ ├── sudoku.xbm │ ├── tile.xpm │ ├── white_1.xbm │ ├── white_2.xbm │ ├── white_3.xbm │ ├── white_4.xbm │ ├── whiteking_1.xbm │ ├── whiteking_2.xbm │ ├── whiteking_3.xbm │ ├── whiteking_4.xbm │ ├── yellow.xpm │ └── yellow_bomb.xpm ├── progress-simple.c ├── rgb.txt ├── table-as-container.c ├── table-simple.c ├── table-sort.c ├── table-spreadsheet-with-keyboard-nav.c ├── table-spreadsheet.c ├── table-with-keynav.c ├── tabs-simple.c ├── textdisplay-with-colors.c ├── texteditor-simple.c ├── tree-of-tables.c ├── tree-simple.c └── wizard-simple.c ├── scripts └── header-to-function-definition.hs └── src ├── DerivedShared_Image.cpp ├── DerivedShared_Image.h ├── DerivedText_Editor.cpp ├── DerivedText_Editor.h ├── Fl_AskC.cpp ├── Fl_AskC.h ├── Fl_BitmapC.cpp ├── Fl_BitmapC.h ├── Fl_BoxC.cpp ├── Fl_BoxC.h ├── Fl_BrowserC.cpp ├── Fl_BrowserC.h ├── Fl_ButtonC.cpp ├── Fl_ButtonC.h ├── Fl_C.cpp ├── Fl_C.h ├── Fl_CallbackC.cpp ├── Fl_CallbackC.h ├── Fl_Check_ButtonC.cpp ├── Fl_Check_ButtonC.h ├── Fl_ChoiceC.cpp ├── Fl_ChoiceC.h ├── Fl_ClockC.cpp ├── Fl_ClockC.h ├── Fl_Color_ChooserC.cpp ├── Fl_Color_ChooserC.h ├── Fl_DeviceC.cpp ├── Fl_DeviceC.h ├── Fl_Double_WindowC.cpp ├── Fl_Double_WindowC.h ├── Fl_DrawC.cpp ├── Fl_DrawC.h ├── Fl_EnumerationsC.cpp ├── Fl_EnumerationsC.h ├── Fl_ExportMacros.h ├── Fl_File_BrowserC.cpp ├── Fl_File_BrowserC.h ├── Fl_File_ChooserC.cpp ├── Fl_File_ChooserC.h ├── Fl_File_IconC.cpp ├── Fl_File_IconC.h ├── Fl_File_InputC.cpp ├── Fl_File_InputC.h ├── Fl_Float_InputC.cpp ├── Fl_Float_InputC.h ├── Fl_Gl_WindowC.cpp ├── Fl_Gl_WindowC.h ├── Fl_GroupC.cpp ├── Fl_GroupC.h ├── Fl_Hold_BrowserC.cpp ├── Fl_Hold_BrowserC.h ├── Fl_Hor_SliderC.cpp ├── Fl_Hor_SliderC.h ├── Fl_Hor_Value_SliderC.cpp ├── Fl_Hor_Value_SliderC.h ├── Fl_ImageC.cpp ├── Fl_ImageC.h ├── Fl_InputC.cpp ├── Fl_InputC.h ├── Fl_Input_C.cpp ├── Fl_Input_C.h ├── Fl_Int_InputC.cpp ├── Fl_Int_InputC.h ├── Fl_Light_ButtonC.cpp ├── Fl_Light_ButtonC.h ├── Fl_Menu_BarC.cpp ├── Fl_Menu_BarC.h ├── Fl_Menu_C.cpp ├── Fl_Menu_C.h ├── Fl_Menu_ItemC.cpp ├── Fl_Menu_ItemC.h ├── Fl_Multi_BrowserC.cpp ├── Fl_Multi_BrowserC.h ├── Fl_Multiline_InputC.cpp ├── Fl_Multiline_InputC.h ├── Fl_Multiline_OutputC.cpp ├── Fl_Multiline_OutputC.h ├── Fl_Native_File_ChooserC.cpp ├── Fl_Native_File_ChooserC.h ├── Fl_OutputC.cpp ├── Fl_OutputC.h ├── Fl_Overlay_WindowC.cpp ├── Fl_Overlay_WindowC.h ├── Fl_PNM_ImageC.cpp ├── Fl_PNM_ImageC.h ├── Fl_Paged_DeviceC.cpp ├── Fl_Paged_DeviceC.h ├── Fl_PixmapC.cpp ├── Fl_PixmapC.h ├── Fl_PreferencesC.cpp ├── Fl_PreferencesC.h ├── Fl_PrinterC.cpp ├── Fl_PrinterC.h ├── Fl_ProgressC.cpp ├── Fl_ProgressC.h ├── Fl_RGB_ImageC.cpp ├── Fl_RGB_ImageC.h ├── Fl_Radio_ButtonC.cpp ├── Fl_Radio_ButtonC.h ├── Fl_Radio_Light_ButtonC.cpp ├── Fl_Radio_Light_ButtonC.h ├── Fl_Repeat_ButtonC.cpp ├── Fl_Repeat_ButtonC.h ├── Fl_Return_ButtonC.cpp ├── Fl_Return_ButtonC.h ├── Fl_Round_ButtonC.cpp ├── Fl_Round_ButtonC.h ├── Fl_Round_ClockC.cpp ├── Fl_Round_ClockC.h ├── Fl_Secret_InputC.cpp ├── Fl_Secret_InputC.h ├── Fl_Select_BrowserC.cpp ├── Fl_Select_BrowserC.h ├── Fl_Shared_ImageC.cpp ├── Fl_Shared_ImageC.h ├── Fl_Single_WindowC.cpp ├── Fl_Single_WindowC.h ├── Fl_SliderC.cpp ├── Fl_SliderC.h ├── Fl_Sys_Menu_BarC.cpp ├── Fl_Sys_Menu_BarC.h ├── Fl_TableC.cpp ├── Fl_TableC.h ├── Fl_Table_RowC.cpp ├── Fl_Table_RowC.h ├── Fl_TabsC.cpp ├── Fl_TabsC.h ├── Fl_Text_BufferC.cpp ├── Fl_Text_BufferC.h ├── Fl_Text_DisplayC.cpp ├── Fl_Text_DisplayC.h ├── Fl_Text_EditorC.cpp ├── Fl_Text_EditorC.h ├── Fl_Text_SelectionC.cpp ├── Fl_Text_SelectionC.h ├── Fl_TileC.cpp ├── Fl_TileC.h ├── Fl_Toggle_ButtonC.cpp ├── Fl_Toggle_ButtonC.h ├── Fl_TooltipC.cpp ├── Fl_TooltipC.h ├── Fl_TreeC.cpp ├── Fl_TreeC.h ├── Fl_Tree_ItemC.cpp ├── Fl_Tree_ItemC.h ├── Fl_Tree_PrefsC.cpp ├── Fl_Tree_PrefsC.h ├── Fl_Types.h ├── Fl_ValuatorC.cpp ├── Fl_ValuatorC.h ├── Fl_Value_InputC.cpp ├── Fl_Value_InputC.h ├── Fl_Value_SliderC.cpp ├── Fl_Value_SliderC.h ├── Fl_WidgetC.cpp ├── Fl_WidgetC.h ├── Fl_WindowC.cpp ├── Fl_WindowC.h ├── Fl_WizardC.cpp ├── Fl_WizardC.h ├── Makefile.in ├── filenameC.cpp ├── filenameC.h ├── fl_show_colormapC.cpp ├── fl_show_colormapC.h ├── glC.cpp ├── glC.h ├── glutC.cpp ├── glutC.h ├── xC.cpp └── xC.h /.gitignore: -------------------------------------------------------------------------------- 1 | *.a 2 | *.o 3 | .\#* 4 | executables/* 5 | lib/* 6 | ./ 7 | Makefile 8 | aclocal.m4 9 | autom4te.cache 10 | config.guess 11 | config.log 12 | config.status 13 | config.sub 14 | configure 15 | config.h 16 | autoscan.log 17 | object_files/* 18 | examples/Makefile 19 | src/Makefile 20 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | EXECUTABLEDIR = executables 2 | LIBDIR = lib 3 | OBJECT_FILES = object_files 4 | DIRS = src examples 5 | .SILENT: 6 | all: 7 | for dir in $(DIRS); do\ 8 | echo "=== making $$dir ===";\ 9 | (cd $$dir; $(MAKE) all) || exit 1;\ 10 | done 11 | 12 | clean: 13 | test -d $(EXECUTABLEDIR) && rm -rf $(EXECUTABLEDIR) 14 | test -d $(LIBDIR) && rm -rf $(LIBDIR) 15 | test -d $(OBJECT_FILES) && rm -rf $(OBJECT_FILES) 16 | # for dir in $(DIRS); do\ 17 | # echo "=== cleaning $$dir ===";\ 18 | # (cd $$dir; $(MAKE) clean) || exit 1;\ 19 | # done 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | FLTKC - A C Binding to the FLTK GUI Library 2 | ============================================= 3 | 4 | FLTKC aims to be a complete C binding to the [FLTK GUI library] [1]. It's only dependencies are gcc, g++ and FLTK 1.3.x. 5 | 6 | The ``src'' directory contains the ported widgets and functions. 7 | 8 | The ``examples'' contains ports of some of the examples provided with the FLTK distribution. 9 | 10 | This README will be more complete once the bindings are ready for release. 11 | 12 | [1]: http://www.fltk.org/index.php "FLTK" 13 | -------------------------------------------------------------------------------- /configure.scan: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.69]) 5 | AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS]) 6 | AC_CONFIG_SRCDIR([src/Fl_ClockC.h]) 7 | AC_CONFIG_HEADERS([config.h]) 8 | 9 | # Checks for programs. 10 | AC_PROG_CXX 11 | AC_PROG_CC 12 | 13 | # Checks for libraries. 14 | # FIXME: Replace `main' with a function in `-lGL': 15 | AC_CHECK_LIB([GL], [main]) 16 | # FIXME: Replace `main' with a function in `-lGLU': 17 | AC_CHECK_LIB([GLU], [main]) 18 | # FIXME: Replace `main' with a function in `-lX11': 19 | AC_CHECK_LIB([X11], [main]) 20 | # FIXME: Replace `main' with a function in `-lXext': 21 | AC_CHECK_LIB([Xext], [main]) 22 | # FIXME: Replace `main' with a function in `-lXft': 23 | AC_CHECK_LIB([Xft], [main]) 24 | # FIXME: Replace `main' with a function in `-lXinerama': 25 | AC_CHECK_LIB([Xinerama], [main]) 26 | # FIXME: Replace `main' with a function in `-ldl': 27 | AC_CHECK_LIB([dl], [main]) 28 | # FIXME: Replace `main' with a function in `-lfltk': 29 | AC_CHECK_LIB([fltk], [main]) 30 | # FIXME: Replace `main' with a function in `-lfltk_gl': 31 | AC_CHECK_LIB([fltk_gl], [main]) 32 | # FIXME: Replace `main' with a function in `-lfltk_images': 33 | AC_CHECK_LIB([fltk_images], [main]) 34 | # FIXME: Replace `main' with a function in `-lfontconfig': 35 | AC_CHECK_LIB([fontconfig], [main]) 36 | # FIXME: Replace `main' with a function in `-ljpeg': 37 | AC_CHECK_LIB([jpeg], [main]) 38 | # FIXME: Replace `main' with a function in `-lm': 39 | AC_CHECK_LIB([m], [main]) 40 | # FIXME: Replace `main' with a function in `-lpng': 41 | AC_CHECK_LIB([png], [main]) 42 | # FIXME: Replace `main' with a function in `-lpthread': 43 | AC_CHECK_LIB([pthread], [main]) 44 | # FIXME: Replace `main' with a function in `-lz': 45 | AC_CHECK_LIB([z], [main]) 46 | 47 | # Checks for header files. 48 | AC_CHECK_HEADERS([stddef.h stdint.h stdlib.h string.h unistd.h]) 49 | 50 | # Checks for typedefs, structures, and compiler characteristics. 51 | AC_CHECK_HEADER_STDBOOL 52 | AC_TYPE_SIZE_T 53 | 54 | # Checks for library functions. 55 | AC_FUNC_MALLOC 56 | AC_CHECK_FUNCS([select strdup strerror strrchr strtol]) 57 | 58 | AC_CONFIG_FILES([Makefile]) 59 | AC_OUTPUT 60 | -------------------------------------------------------------------------------- /examples/Makefile.in: -------------------------------------------------------------------------------- 1 | FLTKCONFIG=@FLTKCONFIG@ 2 | CXX = $(shell $(FLTKCONFIG) --cxx) $(shell $(FLTKCONFIG) --cxxflags) -Wall -Werror -DINTERNAL_LINKAGE -g -Icpp 3 | LD = $(CXX) -shared 4 | CC = $(shell $(FLTKCONFIG) --cc) $(shell $(FLTKCONFIG) --cflags) -Wall -Werror -g -I../src -I../ -I./ 5 | 6 | ifeq '$(OS)' "Windows_NT" 7 | EXEEXT = .exe 8 | endif 9 | 10 | EXAMPLES= \ 11 | arc.c \ 12 | bitmap.c \ 13 | boxtype.c \ 14 | browser.c \ 15 | button.c \ 16 | buttons.c \ 17 | clock.c \ 18 | colbrowser.c \ 19 | color_chooser.c \ 20 | cube.c \ 21 | cursor.c \ 22 | curve.c \ 23 | device.c \ 24 | doublebuffer.c \ 25 | file_chooser.c \ 26 | fonts.c \ 27 | howto-add_fd-and-popen.c \ 28 | howto-browser-with-icons.c \ 29 | howto-drag-and-drop.c \ 30 | howto-parse-args.c \ 31 | howto-text-over-image-button.c \ 32 | list_visuals.c \ 33 | make_button_with_callback.c \ 34 | make_input.c \ 35 | make_tree.c \ 36 | make_window.c \ 37 | make_window_fullscreen.c \ 38 | make_window_hide.c \ 39 | make_window_resize.c \ 40 | make_window_with_callback.c \ 41 | make_window_with_width_height.c \ 42 | menubar-add.c \ 43 | nativefilechooser-simple-app.c \ 44 | progress-simple.c \ 45 | rgb.txt \ 46 | table-as-container.c \ 47 | table-simple.c \ 48 | table-sort.c \ 49 | table-spreadsheet.c \ 50 | table-spreadsheet-with-keyboard-nav.c \ 51 | table-with-keynav.c \ 52 | tabs-simple.c \ 53 | textdisplay-with-colors.c \ 54 | texteditor-simple.c \ 55 | tree-of-tables.c \ 56 | tree-simple.c \ 57 | wizard-simple.c 58 | 59 | .SUFFIXES: .c $(EXEEXT) 60 | .SILENT: 61 | EXECUTABLEDIR = ../executables 62 | LIBDIR = ../lib 63 | OBJECT_FILES = ../object_files 64 | OBJECTS = $(EXAMPLES:.c=$(EXEEXT)) 65 | 66 | all: $(OBJECTS) 67 | .c$(EXEEXT): 68 | test -d $(OBJECT_FILES) || mkdir $(OBJECT_FILES) 69 | @echo "*** Building $@" 70 | $(CC) -c $^ -o $(OBJECT_FILES)/$@.o 71 | test -d $(EXECUTABLEDIR) || mkdir $(EXECUTABLEDIR) 72 | $(CXX) -o $(EXECUTABLEDIR)/$@ $(OBJECT_FILES)/$@.o $(LIBDIR)/libfltkc.a -lfltk_images -lpng -lz -ljpeg -lfltk_gl -lGLU -lGL -lfltk -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl -lm -lX11 73 | strip $(EXECUTABLEDIR)/$@ 74 | 75 | clean: 76 | test -d $(EXECUTABLEDIR) && rm -rf $(EXECUTABLEDIR) 77 | test -d $(OBJECT_FILES) && rm -rf $(OBJECT_FILES) 78 | %.o: 79 | -------------------------------------------------------------------------------- /examples/arc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_Types.h" 4 | #include "Fl_Double_WindowC.h" 5 | #include "Fl_Hor_Value_SliderC.h" 6 | #include "Fl_DrawC.h" 7 | #include "Fl_WidgetC.h" 8 | #include "Fl_SliderC.h" 9 | 10 | 11 | double my_args[6] = {140, 140, 50, 0, 360, 0}; 12 | const char* name[6] = {"X", "Y", "R", "start", "end", "rotate"}; 13 | fl_Widget d; 14 | 15 | void draw(fl_Widget widget){ 16 | flc_push_clip(Fl_Widget_x(widget),Fl_Widget_y(widget),Fl_Widget_w(widget),Fl_Widget_h(widget)); 17 | flc_set_color(FL_DARK3); 18 | flc_rectf(Fl_Widget_x(widget),Fl_Widget_y(widget),Fl_Widget_w(widget),Fl_Widget_h(widget)); 19 | flc_push_matrix(); 20 | if (my_args[5]) { 21 | flc_translate(Fl_Widget_x(widget)+Fl_Widget_w(widget)/2.0, Fl_Widget_y(widget)+Fl_Widget_h(widget)/2.0); 22 | flc_rotate(my_args[5]); 23 | flc_translate(-(Fl_Widget_x(widget)+Fl_Widget_w(widget)/2.0), -(Fl_Widget_y(widget)+Fl_Widget_h(widget)/2.0)); 24 | } 25 | flc_set_color(FL_WHITE); 26 | flc_translate(Fl_Widget_x(widget),Fl_Widget_y(widget)); 27 | flc_begin_complex_polygon(); 28 | flc_arc_by_radius(my_args[0],my_args[1],my_args[2],my_args[3],my_args[4]); 29 | flc_gap(); 30 | flc_arc_by_radius(140,140,20,0,-360); 31 | flc_end_complex_polygon(); 32 | flc_set_color(FL_RED); 33 | flc_begin_line(); 34 | flc_arc_by_radius(my_args[0],my_args[1],my_args[2],my_args[3],my_args[4]); 35 | flc_end_line(); 36 | flc_pop_matrix(); 37 | flc_pop_clip(); 38 | } 39 | 40 | 41 | void slider_cb(fl_Widget o, void* v) { 42 | fl_Slider s = (fl_Slider)o; 43 | int idx = (fl_intptr_t)v; 44 | my_args[idx] = Fl_Slider_value(s); 45 | Fl_Widget_redraw(d); 46 | } 47 | 48 | int main(int argc, char** argv) { 49 | fl_Widget_Virtual_Funcs* fs = Fl_Widget_default_virtual_funcs(); 50 | fs->draw = &draw; 51 | fl_Double_Window window = (fl_Double_Window)Fl_Double_Window_New(300,500); 52 | Fl_Double_Window_begin(window); 53 | fl_Widget widget = (fl_Widget)Fl_OverriddenWidget_New(10,10,280,280,fs); 54 | d = widget; 55 | int y = 300; 56 | int n = 0; 57 | for (; n<6; n++) { 58 | fl_Hor_Value_Slider s= (fl_Hor_Value_Slider)Fl_Hor_Value_Slider_New_WithLabel(50,y,240,25,name[n]); 59 | y += 25; 60 | if (n<3) {Fl_Hor_Value_Slider_set_minimum(s,0); Fl_Hor_Value_Slider_set_maximum(s,300);} 61 | else if (n==5) {Fl_Hor_Value_Slider_set_minimum(s,0); Fl_Hor_Value_Slider_set_maximum(s,360);} 62 | else {Fl_Hor_Value_Slider_set_minimum(s,-360); Fl_Hor_Value_Slider_set_maximum(s,360);} 63 | Fl_Hor_Value_Slider_set_step(s,1); 64 | Fl_Hor_Value_Slider_set_value(s,my_args[n]); 65 | Fl_Hor_Value_Slider_set_align(s,FL_ALIGN_LEFT); 66 | #ifdef __LP64__ 67 | Fl_Hor_Value_Slider_set_callback_with_user_data(s,slider_cb, (void*)(long long) n); 68 | #else 69 | Fl_Hor_Value_Slider_set_callback_with_user_data(s,slider_cb, (void*) n); 70 | #endif 71 | } 72 | Fl_Double_Window_end(window); 73 | Fl_Double_Window_show_with_args(window, argc, argv); 74 | return (Fl_run()); 75 | } 76 | -------------------------------------------------------------------------------- /examples/boxtype.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "Fl_C.h" 4 | #include "Fl_Double_WindowC.h" 5 | #include "Fl_BoxC.h" 6 | 7 | int N = 0; 8 | #define W 200 9 | #define H 50 10 | #define ROWS 14 11 | 12 | fl_Double_Window window; 13 | 14 | void bt(const char *name, Fl_Boxtype type, int square) { 15 | int x = N%4; 16 | int y = N/4; 17 | N++; 18 | x = x*W+10; 19 | y = y*H+10; 20 | fl_Box b = (fl_Box)Fl_Box_New_WithBoxtype(type,x,y,square ? H-20 : W-20,H-20,name); 21 | Fl_Box_set_labelsize(b,11); 22 | if (square) Fl_Box_set_align(b,FL_ALIGN_RIGHT); 23 | } 24 | 25 | int main (int argc, char** argv){ 26 | window = (fl_Double_Window)Fl_Double_Window_New(4*W,ROWS*H); 27 | Fl_Double_Window_set_box(window,FL_FLAT_BOX); 28 | #if 0 29 | Fl_args(argc,argv); 30 | Fl_get_system_colors(); 31 | #elif 0 32 | Fl_args(argc,argv); 33 | Fl_get_system_colors(); 34 | Fl_background(113,113,198); 35 | #else 36 | Fl_args(argc,argv); 37 | Fl_get_system_colors(); 38 | Fl_Double_Window_set_color(window,12); 39 | #endif 40 | bt("FL_NO_BOX",FL_NO_BOX,0); 41 | bt("FL_FLAT_BOX",FL_FLAT_BOX,0); 42 | N += 2; // go to start of next row to line up boxes & frames 43 | bt("FL_UP_BOX",FL_UP_BOX,0); 44 | bt("FL_DOWN_BOX",FL_DOWN_BOX,0); 45 | bt("FL_UP_FRAME",FL_UP_FRAME,0); 46 | bt("FL_DOWN_FRAME",FL_DOWN_FRAME,0); 47 | bt("FL_THIN_UP_BOX",FL_THIN_UP_BOX,0); 48 | bt("FL_THIN_DOWN_BOX",FL_THIN_DOWN_BOX,0); 49 | bt("FL_THIN_UP_FRAME",FL_THIN_UP_FRAME,0); 50 | bt("FL_THIN_DOWN_FRAME",FL_THIN_DOWN_FRAME,0); 51 | bt("FL_ENGRAVED_BOX",FL_ENGRAVED_BOX,0); 52 | bt("FL_EMBOSSED_BOX",FL_EMBOSSED_BOX,0); 53 | bt("FL_ENGRAVED_FRAME",FL_ENGRAVED_FRAME,0); 54 | bt("FL_EMBOSSED_FRAME",FL_EMBOSSED_FRAME,0); 55 | bt("FL_BORDER_BOX",FL_BORDER_BOX,0); 56 | bt("FL_SHADOW_BOX",FL_SHADOW_BOX,0); 57 | bt("FL_BORDER_FRAME",FL_BORDER_FRAME,0); 58 | bt("FL_SHADOW_FRAME",FL_SHADOW_FRAME,0); 59 | bt("FL_ROUNDED_BOX",FL_ROUNDED_BOX,0); 60 | bt("FL_RSHADOW_BOX",FL_RSHADOW_BOX,0); 61 | bt("FL_ROUNDED_FRAME",FL_ROUNDED_FRAME,0); 62 | bt("FL_RFLAT_BOX",FL_RFLAT_BOX,0); 63 | bt("FL_OVAL_BOX",FL_OVAL_BOX,0); 64 | bt("FL_OSHADOW_BOX",FL_OSHADOW_BOX,0); 65 | bt("FL_OVAL_FRAME",FL_OVAL_FRAME,0); 66 | bt("FL_OFLAT_BOX",FL_OFLAT_BOX,0); 67 | bt("FL_ROUND_UP_BOX",FL_ROUND_UP_BOX,0); 68 | bt("FL_ROUND_DOWN_BOX",FL_ROUND_DOWN_BOX,0); 69 | bt("FL_DIAMOND_UP_BOX",FL_DIAMOND_UP_BOX,0); 70 | bt("FL_DIAMOND_DOWN_BOX",FL_DIAMOND_DOWN_BOX,0); 71 | 72 | bt("FL_PLASTIC_UP_BOX",FL_PLASTIC_UP_BOX,0); 73 | bt("FL_PLASTIC_DOWN_BOX",FL_PLASTIC_DOWN_BOX,0); 74 | bt("FL_PLASTIC_UP_FRAME",FL_PLASTIC_UP_FRAME,0); 75 | bt("FL_PLASTIC_DOWN_FRAME",FL_PLASTIC_DOWN_FRAME,0); 76 | bt("FL_PLASTIC_THIN_UP_BOX",FL_PLASTIC_THIN_UP_BOX,0); 77 | bt("FL_PLASTIC_THIN_DOWN_BOX",FL_PLASTIC_THIN_DOWN_BOX,0); 78 | N += 2; 79 | bt("FL_PLASTIC_ROUND_UP_BOX",FL_PLASTIC_ROUND_UP_BOX,0); 80 | bt("FL_PLASTIC_ROUND_DOWN_BOX",FL_PLASTIC_ROUND_DOWN_BOX,0); 81 | N += 2; 82 | 83 | bt("FL_GTK_UP_BOX",FL_GTK_UP_BOX,0); 84 | bt("FL_GTK_DOWN_BOX",FL_GTK_DOWN_BOX,0); 85 | bt("FL_GTK_UP_FRAME",FL_GTK_UP_FRAME,0); 86 | bt("FL_GTK_DOWN_FRAME",FL_GTK_DOWN_FRAME,0); 87 | bt("FL_GTK_THIN_UP_BOX",FL_GTK_THIN_UP_BOX,0); 88 | bt("FL_GTK_THIN_DOWN_BOX",FL_GTK_THIN_DOWN_BOX,0); 89 | bt("FL_GTK_THIN_UP_FRAME",FL_GTK_THIN_UP_FRAME,0); 90 | bt("FL_GTK_THIN_DOWN_FRAME",FL_GTK_THIN_DOWN_FRAME,0); 91 | bt("FL_GTK_ROUND_UP_BOX",FL_GTK_ROUND_UP_BOX,0); 92 | bt("FL_GTK_ROUND_DOWN_BOX",FL_GTK_ROUND_DOWN_BOX,0); 93 | Fl_Double_Window_set_resizable(window,window); 94 | Fl_Double_Window_end(window); 95 | Fl_Double_Window_show(window); 96 | return (Fl_run()); 97 | } 98 | -------------------------------------------------------------------------------- /examples/button.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | void beepcb(fl_Widget w,void* user_data) { 9 | flc_beep(); 10 | fflush(stdout); 11 | } 12 | 13 | void exitcb(fl_Widget w, void* user_data) { 14 | exit(0); 15 | } 16 | 17 | #if 0 18 | // test Fl::add_fd()... 19 | void stdin_cb(int i, void* user_data) { 20 | char buf[1000]; 21 | fgets(buf, sizeof(buf), stdin); 22 | printf("stdin callback\n"); 23 | } 24 | #endif 25 | 26 | int main(int argc, char ** argv) { 27 | fl_Window window = (fl_Window)Fl_Window_New(320,65); 28 | fl_Button b1 = (fl_Button)Fl_Button_New_WithLabel(20, 20, 80, 25, "&Beep"); 29 | Fl_Button_set_callback_with_user_data(b1,beepcb,0); 30 | /*Fl_Button *b2 =*/ Fl_Button_New_WithLabel(120,20, 80, 25, "&no op"); 31 | fl_Button b3 = (fl_Button)Fl_Button_New_WithLabel(220,20, 80, 25, "E&xit"); 32 | Fl_Button_set_callback_with_user_data(b3,exitcb,0); 33 | Fl_Window_end(window); 34 | Fl_Window_show_with_args(window,argc,argv); 35 | #if 0 36 | Fl_add_fd(0, stdin_cb); 37 | #endif 38 | return Fl_run(); 39 | } 40 | -------------------------------------------------------------------------------- /examples/buttons.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | int main(int argc, char ** argv) { 14 | fl_Window window = Fl_Window_New(320,130); 15 | fl_Button b = Fl_Button_New_WithLabel(10, 10, 130, 30, "Fl_Button"); 16 | Fl_Button_set_tooltip(b,"This is a Tooltip."); 17 | Fl_Return_Button_New_WithLabel(150, 10, 160, 30, "Fl_Return_Button"); 18 | Fl_Repeat_Button_New_WithLabel(10,50,130,30,"Fl_Repeat_Button"); 19 | Fl_Light_Button_New_WithLabel(10,90,130,30,"Fl_Light_Button"); 20 | Fl_Round_Button_New_WithLabel(150,50,160,30,"Fl_Round_Button"); 21 | Fl_Check_Button_New_WithLabel(150,90,160,30,"Fl_Check_Button"); 22 | Fl_Window_end(window); 23 | Fl_Window_show_with_args(window,argc,argv); 24 | return Fl_run(); 25 | } 26 | -------------------------------------------------------------------------------- /examples/clock.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(int argc, char **argv) { 7 | fl_Double_Window window = (fl_Double_Window)Fl_Double_Window_New_WithLabel(220,220,"Fl_Clock"); 8 | fl_Clock c1 = (fl_Clock)Fl_Clock_New(0,0,220,220); 9 | Fl_Double_Window_set_resizable(window,c1); 10 | Fl_Double_Window_end(window); 11 | fl_Double_Window window2 = (fl_Double_Window)Fl_Double_Window_New_WithLabel(220,220,"Fl_Round_Clock"); 12 | fl_Round_Clock c2 = (fl_Round_Clock) Fl_Round_Clock_New(0,0,220,220); // c2.color(3,4); 13 | Fl_Double_Window_set_resizable(window2,c2); 14 | Fl_Double_Window_end(window2); 15 | Fl_Double_Window_set_xclass(window,"Fl_Clock"); 16 | Fl_Double_Window_set_xclass(window2,"Fl_Clock"); 17 | Fl_Double_Window_show_with_args(window,argc,argv); 18 | Fl_Double_Window_show(window2); 19 | return Fl_run(); 20 | } 21 | -------------------------------------------------------------------------------- /examples/curve.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | double args[9] = { 11 | 20,20, 50,200, 100,20, 200,200, 0}; 12 | const char* name[9] = { 13 | "X0", "Y0", "X1", "Y1", "X2", "Y2", "X3", "Y3", "rotate"}; 14 | 15 | int points; 16 | 17 | void draw(fl_Widget w){ 18 | flc_push_clip(Fl_Widget_x(w),Fl_Widget_y(w),Fl_Widget_w(w),Fl_Widget_h(w)); 19 | flc_set_color(FL_DARK3); 20 | flc_rectf(Fl_Widget_x(w),Fl_Widget_y(w),Fl_Widget_w(w),Fl_Widget_h(w)); 21 | flc_push_matrix(); 22 | if (args[8]) { 23 | flc_translate(Fl_Widget_x(w)+Fl_Widget_w(w)/2.0, Fl_Widget_y(w)+Fl_Widget_h(w)/2.0); 24 | flc_rotate(args[8]); 25 | flc_translate(-(Fl_Widget_x(w)+Fl_Widget_w(w)/2.0), -(Fl_Widget_y(w)+Fl_Widget_h(w)/2.0)); 26 | } 27 | flc_translate(Fl_Widget_x(w),Fl_Widget_y(w)); 28 | if (!points) { 29 | flc_set_color(FL_WHITE); 30 | flc_begin_complex_polygon(); 31 | flc_curve(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]); 32 | flc_end_complex_polygon(); 33 | } 34 | flc_set_color(FL_BLACK); 35 | flc_begin_line(); 36 | flc_vertex(args[0],args[1]); 37 | flc_vertex(args[2],args[3]); 38 | flc_vertex(args[4],args[5]); 39 | flc_vertex(args[6],args[7]); 40 | flc_end_line(); 41 | flc_set_color(points ? FL_WHITE : FL_RED); 42 | points ? flc_begin_points() : flc_begin_line(); 43 | flc_curve(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7]); 44 | points ? flc_end_points() : flc_end_line(); 45 | flc_pop_matrix(); 46 | flc_pop_clip(); 47 | } 48 | 49 | fl_Widget d; 50 | 51 | void points_cb(fl_Widget o, void* user_data) { 52 | points = Fl_Toggle_Button_value((fl_Toggle_Button)o); 53 | Fl_Widget_redraw(d); 54 | } 55 | 56 | void slider_cb(fl_Widget o, void* v) { 57 | fl_Slider s = (fl_Slider)o; 58 | args[(fl_intptr_t)(v)] = Fl_Slider_value(s); 59 | Fl_Widget_redraw(d); 60 | } 61 | 62 | int main(int argc, char** argv) { 63 | fl_Widget_Virtual_Funcs* funcs = Fl_Widget_default_virtual_funcs(); 64 | funcs->draw = &draw; 65 | fl_Double_Window window = (fl_Double_Window)Fl_Double_Window_New(300,555); 66 | fl_Widget drawing = (fl_Widget)Fl_OverriddenWidget_New(10,10,280,280,funcs); 67 | d = drawing; 68 | int y = 300; 69 | int n = 0; 70 | for (; n<9; n++) { 71 | fl_Hor_Value_Slider s = (fl_Hor_Value_Slider)Fl_Hor_Value_Slider_New_WithLabel(50,y,240,25,name[n]); 72 | y += 25; 73 | Fl_Hor_Value_Slider_set_minimum(s,0); Fl_Hor_Value_Slider_set_maximum(s,280); 74 | if (n == 8) Fl_Hor_Value_Slider_set_maximum(s,360); 75 | Fl_Hor_Value_Slider_set_step(s,1); 76 | Fl_Hor_Value_Slider_set_value(s,args[n]); 77 | Fl_Hor_Value_Slider_set_align(s,FL_ALIGN_LEFT); 78 | #ifdef __LP64__ 79 | Fl_Hor_Value_Slider_set_callback_with_user_data(s,slider_cb, (void*) (long long)n); 80 | #else 81 | Fl_Hor_Value_Slider_set_callback_with_user_data(s,slider_cb, (void*)n); 82 | #endif 83 | } 84 | fl_Toggle_Button but = (fl_Toggle_Button)Fl_Toggle_Button_New_WithLabel(50,y,50,25,"points"); 85 | Fl_Toggle_Button_set_callback(but,points_cb); 86 | 87 | Fl_Double_Window_end(window); 88 | Fl_Double_Window_show_with_args(window,argc,argv); 89 | return Fl_run(); 90 | } 91 | -------------------------------------------------------------------------------- /examples/doublebuffer.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | void star(int w, int h, int n) { 13 | flc_push_matrix(); 14 | flc_translate(w/2, h/2); 15 | flc_scale_with_y(w/2, h/2); 16 | int i = 0; 17 | for (; i < n; i++) { 18 | int j = i + 1; 19 | for (; j < n; j++){ 20 | flc_begin_line(); 21 | flc_vertex(cos(2*M_PI*i/n+.1), sin(2*M_PI*i/n+.1)); 22 | flc_vertex(cos(2*M_PI*j/n+.1), sin(2*M_PI*j/n+.1)); 23 | flc_end_line(); 24 | } 25 | } 26 | flc_pop_matrix(); 27 | } 28 | 29 | int sides[2] = {20,20}; 30 | 31 | void slider_cb(fl_Widget o, void* v) { 32 | fl_Slider s = (fl_Slider)o; 33 | sides[(long)v] = (int)Fl_Slider_value(s); 34 | Fl_Slider_redraw(Fl_Slider_parent(s)); 35 | } 36 | void bad_draw(int w,int h,int which) { 37 | flc_set_color(FL_BLACK); flc_rectf(0,0,w,h); 38 | flc_set_color(FL_WHITE); star(w,h,sides[which]); 39 | } 40 | void draw_single(fl_Widget w) { 41 | fl_Single_Window win = (fl_Single_Window)w; 42 | bad_draw(Fl_Single_Window_w(win),Fl_Single_Window_h(win),0); 43 | Fl_Single_Window_draw_child(win, Fl_Single_Window_child(win,0)); 44 | } 45 | void draw_double(fl_Widget w) { 46 | fl_Double_Window win = (fl_Double_Window)w; 47 | bad_draw(Fl_Double_Window_w(win),Fl_Double_Window_h(win),0); 48 | Fl_Double_Window_draw_child(win, Fl_Double_Window_child(win,0)); 49 | } 50 | 51 | int main (int argc ,char** argv){ 52 | if (!Fl_visual(FL_DOUBLE)) 53 | printf("Xdbe not supported, faking double buffer with pixmaps.\n"); 54 | fl_Window w01 = Fl_Window_New_WithLabel(420,420,"Fl_Single_Window"); 55 | Fl_Window_set_box(w01,FL_FLAT_BOX); 56 | fl_Single_Window_Virtual_Funcs* single_funcs = Fl_Single_Window_default_virtual_funcs(); 57 | single_funcs->draw = &draw_single; 58 | fl_Single_Window w1 = Fl_OverriddenSingle_Window_NewXY_WithLabel(10,10,400,400,"Fl_Single_Window",single_funcs); 59 | Fl_Single_Window_set_box(w1,FL_FLAT_BOX); 60 | Fl_Single_Window_set_color(w1,FL_BLACK); //w1.position(100,200); 61 | fl_Hor_Slider slider0 = Fl_Hor_Slider_New(20,370,360,25); 62 | Fl_Hor_Slider_range(slider0,2,30); 63 | Fl_Hor_Slider_set_step(slider0,1); 64 | Fl_Hor_Slider_set_value(slider0,sides[0]); 65 | Fl_Hor_Slider_set_callback(slider0,slider_cb); 66 | Fl_Single_Window_end(w1); 67 | Fl_Window_end(w01); 68 | fl_Window w02 = Fl_Window_New_WithLabel(420,420,"Fl_Double_Window"); 69 | Fl_Window_set_box(w02,FL_FLAT_BOX); 70 | fl_Double_Window_Virtual_Funcs* double_funcs = Fl_Double_Window_default_virtual_funcs(); 71 | double_funcs->draw = &draw_double; 72 | fl_Double_Window w2 = Fl_OverriddenDouble_Window_NewXY_WithLabel(10,10,400,400,"Fl_Double_Window",double_funcs); 73 | Fl_Double_Window_set_box(w2,FL_FLAT_BOX); 74 | Fl_Double_Window_set_color(w2,FL_BLACK); //w2.position(100,200); 75 | fl_Hor_Slider slider1 = Fl_Hor_Slider_New(20,370,360,25); 76 | Fl_Hor_Slider_range(slider1,2,30); 77 | Fl_Hor_Slider_set_step(slider1,1); 78 | Fl_Hor_Slider_set_value(slider1,sides[0]); 79 | Fl_Hor_Slider_set_callback(slider1,slider_cb); 80 | Fl_Double_Window_end(w2); 81 | Fl_Window_end(w02); 82 | Fl_Window_show_with_args(w01,argc, argv); 83 | Fl_Single_Window_show(w1); 84 | Fl_Window_show(w02); 85 | Fl_Double_Window_show(w2); 86 | return Fl_run(); 87 | } 88 | -------------------------------------------------------------------------------- /examples/howto-add_fd-and-popen.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #ifdef WIN32 7 | # define PING_CMD "ping -n 10 localhost" // 'slow command' under windows 8 | # ifdef _MSC_VER 9 | # define popen _popen 10 | # define pclose _pclose 11 | # else /*_MSC_VER*/ 12 | # include // non-MS win32 compilers (untested) 13 | # endif /*_MSC_VER*/ 14 | #else 15 | # include 16 | # define PING_CMD "ping -i 2 -c 10 localhost" // 'slow command' under unix 17 | #endif 18 | 19 | FILE *G_fp = NULL; 20 | 21 | // Handler for add_fd() -- called whenever the ping command outputs a new line of data 22 | void HandleFD(int fd, void *data) { 23 | fl_Multi_Browser brow = (fl_Multi_Browser)data; 24 | char s[1024]; 25 | if ( fgets(s, 1023, G_fp) == NULL ) { // read the line of data 26 | Fl_remove_fd(fileno(G_fp)); // command ended? disconnect callback 27 | pclose(G_fp); // close the descriptor 28 | Fl_Multi_Browser_add(brow, ""); 29 | Fl_Multi_Browser_add(brow, "<>"); 30 | return; 31 | } 32 | Fl_Multi_Browser_add(brow, s); 33 | } 34 | 35 | int main(int argc, char** argv){ 36 | fl_Window win = (fl_Window)Fl_Window_New(600,600); 37 | fl_Multi_Browser brow = (fl_Multi_Browser)Fl_Multi_Browser_New(10,10,580,580); 38 | if ( ( G_fp = popen(PING_CMD, "r") ) == NULL ) { // start the external unix command 39 | perror("popen failed"); 40 | return(1); 41 | } 42 | Fl_add_fd_with_userdata(fileno(G_fp), HandleFD, (void*)brow); // setup a callback for the popen()ed descriptor 43 | Fl_Window_set_resizable(win, brow); 44 | Fl_Window_show_with_args(win, argc, argv); 45 | return(Fl_run()); 46 | } 47 | -------------------------------------------------------------------------------- /examples/howto-drag-and-drop.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int handle_sender(fl_Box box, int event){ 8 | int ret = Fl_Box_handle_super(box,event); 9 | switch ( event ) { 10 | case FL_PUSH: { 11 | const char *msg = "It works!"; 12 | Fl_copy_with_destination(msg,strlen(msg),0); 13 | Fl_dnd(); 14 | ret = 1; 15 | break; 16 | } 17 | } 18 | return(ret); 19 | } 20 | void initialize_sender(fl_Box sender){ 21 | Fl_Box_set_box(sender,FL_FLAT_BOX); 22 | Fl_Box_set_color(sender, 9); 23 | Fl_Box_set_label(sender,"Drag\nfrom\nhere.."); 24 | } 25 | int handle_receiver(fl_Box box, int event){ 26 | int ret = Fl_Box_handle_super(box,event); 27 | switch ( event ) { 28 | case FL_DND_ENTER: // return(1) for these events to 'accept' dnd 29 | case FL_DND_DRAG: 30 | case FL_DND_RELEASE: 31 | ret = 1; 32 | break; 33 | case FL_PASTE: // handle actual drop (paste) operation 34 | Fl_Box_set_label(box,Fl_event_text()); 35 | fprintf(stderr, "Pasted '%s'\n", Fl_event_text()); 36 | ret = 1; 37 | break; 38 | } 39 | return(ret); 40 | } 41 | void initialize_receiver(fl_Box receiver){ 42 | Fl_Box_set_box(receiver,FL_FLAT_BOX); 43 | Fl_Box_set_color(receiver, 10); 44 | Fl_Box_set_label(receiver,"..to\nhere"); 45 | } 46 | int main(int argc, char** argv){ 47 | fl_Window win_a = (fl_Window)Fl_Window_NewXY_WithLabel(0,0,200,100,"Sender"); 48 | fl_Box_Virtual_Funcs* funcs_a = Fl_Box_default_virtual_funcs(); 49 | funcs_a->handle = &handle_sender; 50 | fl_Box a = (fl_Box) Fl_OverriddenBox_New(0,0,100,100,funcs_a); 51 | initialize_sender(a); 52 | Fl_Window_end(win_a); 53 | Fl_Window_show(win_a); 54 | fl_Window win_b = (fl_Window)Fl_Window_NewXY_WithLabel(400,0,200,100,"Receiver"); 55 | fl_Box_Virtual_Funcs* funcs_b = Fl_Box_default_virtual_funcs(); 56 | funcs_b->handle = &handle_receiver; 57 | fl_Box b = (fl_Box) Fl_OverriddenBox_New(100,0,100,100,funcs_b); 58 | initialize_receiver(b); 59 | Fl_Window_end(win_b); 60 | Fl_Window_show(win_b); 61 | return Fl_run(); 62 | } 63 | -------------------------------------------------------------------------------- /examples/howto-parse-args.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int helpFlag = 0; 8 | char *optionString = 0; 9 | int arg(int argc, char **argv, int* i) 10 | { 11 | printf("i: %d\n", *i); 12 | if (strcmp("-h", argv[*i]) == 0 || strcmp("--help", argv[*i]) == 0) { 13 | helpFlag = 1; 14 | *i += 1; 15 | return 1; 16 | } 17 | if (strcmp("-o", argv[*i]) == 0 || strcmp("--option", argv[*i]) == 0) { 18 | if (*i < argc-1 && argv[*i+1] != 0) { 19 | optionString = argv[*i+1]; 20 | *i += 2; 21 | return 2; 22 | } 23 | } 24 | return 0; 25 | } 26 | int main(int argc, char** argv) 27 | { 28 | int i = 1; 29 | if (Fl_args_with_handler(argc, argv, i, arg) < argc) 30 | // note the concatenated strings to give a single format string! 31 | printf("error: unknown option: %s\n" 32 | "usage: %s [options]\n" 33 | " -h | --help : print extended help message\n" 34 | " -o | --option # : example option with parameter\n" 35 | " plus standard fltk options\n", 36 | argv[i], argv[0]); 37 | if (helpFlag) 38 | printf("usage: %s [options]\n" 39 | " -h | --help : print extended help message\n" 40 | " -o | --option # : example option with parameter\n" 41 | " plus standard fltk options:\n" 42 | "\n", 43 | argv[0]); 44 | 45 | fl_Window mainWin = (fl_Window)Fl_Window_New(300,200); 46 | fl_Box textBox = (fl_Box)Fl_Box_New(0, 0, 300, 200); 47 | if (optionString != 0) 48 | Fl_Box_set_label(textBox, optionString); 49 | else 50 | Fl_Box_set_label(textBox, "re-run with [-o|--option] text"); 51 | Fl_Window_show_with_args(mainWin,argc, argv); 52 | return Fl_run(); 53 | } 54 | -------------------------------------------------------------------------------- /examples/list_visuals.c: -------------------------------------------------------------------------------- 1 | #if defined(WIN32) || defined(__APPLE__) 2 | #include 3 | #include 4 | int main(int argc, char** argv) { 5 | fl_alert("Currently, this program works only under X."); 6 | return 1; 7 | } 8 | #else 9 | #include "list_visuals.h" 10 | int main(int argc, char** argv) { 11 | if (argc == 1); 12 | else if (argc == 2 && argv[1][0]!='-') dname = argv[1]; 13 | else {fprintf(stderr,"usage: %s \n",argv[0]); exit(1);} 14 | list_visuals(); 15 | return 0; 16 | } 17 | #endif 18 | -------------------------------------------------------------------------------- /examples/make_button_with_callback.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_Types.h" 4 | #include "Fl_WindowC.h" 5 | #include "Fl_Toggle_ButtonC.h" 6 | #include "Fl_Light_ButtonC.h" 7 | #include "Fl_Check_ButtonC.h" 8 | #include "Fl_Radio_ButtonC.h" 9 | #include "Fl_ButtonC.h" 10 | void callback_button1(fl_Button b1, void* user_data) { 11 | printf("%s %s\n", (char*) Fl_Button_label(b1), "has been clicked"); 12 | } 13 | void callback_button2(fl_Button b2, void* user_data) { 14 | printf("%s %s\n", (char*) Fl_Button_label(b2), "has been clicked"); 15 | } 16 | void callback_button3_with_user_data(fl_Button b3, void* user_data) { 17 | printf("%s:%s %s\n", (char*) Fl_Button_label(b3), "Got the user data :", (char*)user_data); 18 | } 19 | int main(int argc, char** argv) 20 | { 21 | char* title = "FLTK Button Window"; 22 | fl_Window win = (fl_Window)Fl_Window_New_WithLabel(500,500,title); 23 | fl_Button b1 = (fl_Button)Fl_Button_New_WithLabel(20,20,100,100,"Button 1"); 24 | Fl_Button_set_callback(b1,(fl_Callback*)callback_button1); 25 | fl_Button b2 = (fl_Button)Fl_Button_New_WithLabel(130,20,100,100,"Button 2"); 26 | Fl_Button_set_callback(b2, (fl_Callback*)callback_button2); 27 | fl_Button b3 = (fl_Button)Fl_Button_New_WithLabel(240,20,100,100,"Button 3"); 28 | char* user_data = "User data"; 29 | Fl_Button_set_callback(b3, (fl_Callback*)callback_button3_with_user_data); 30 | Fl_Button_set_user_data(b3,(void*)user_data); 31 | printf("Retrieve user_data directly:%s\n", (char*)Fl_Button_user_data(b3)); 32 | (fl_Check_Button)Fl_Check_Button_New_WithLabel(20,130,100,100,"Check"); 33 | (fl_Radio_Button)Fl_Radio_Button_New_WithLabel(130,130,100,100,"Radio"); 34 | (fl_Light_Button)Fl_Light_Button_New_WithLabel(240,130,100,100,"Light"); 35 | (fl_Toggle_Button)Fl_Toggle_Button_New_WithLabel(350,130,100,100,"Toggle"); 36 | Fl_Window_end(win); 37 | Fl_Window_show(win); 38 | return Fl_run(); 39 | } 40 | -------------------------------------------------------------------------------- /examples/make_input.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_Types.h" 3 | #include "Fl_C.h" 4 | #include "Fl_WindowC.h" 5 | #include "Fl_File_InputC.h" 6 | #include "Fl_Float_InputC.h" 7 | #include "Fl_Int_InputC.h" 8 | #include "Fl_Secret_InputC.h" 9 | #include "Fl_Multiline_InputC.h" 10 | #include "Fl_Value_InputC.h" 11 | #include "Fl_InputC.h" 12 | 13 | int main(int argc, char** argv) 14 | { 15 | char* title = "FLTK Input Window"; 16 | fl_Window win = (fl_Window)Fl_Window_New_WithLabel(500,500,title); 17 | Fl_File_Input_New_WithLabel(150,50,200,40,"File Input Box"); 18 | Fl_Float_Input_New_WithLabel(150,100,200,40,"Float Input Box"); 19 | Fl_Int_Input_New_WithLabel(150,150,200,40,"Int Input Box"); 20 | Fl_Secret_Input_New_WithLabel(150,200,200,40,"Secret Input Box"); 21 | Fl_Multiline_Input_New_WithLabel(150,250,200,80,"Multiline Input Box"); 22 | fl_Value_Input value_input = (fl_Value_Input)Fl_Value_Input_New_WithLabel(150,320,200,40,"Value Input Box"); 23 | Fl_Value_Input_set_labeltype(value_input, FL_EMBOSSED_LABEL); 24 | (fl_Input)Fl_Input_New_WithLabel(150,370,200,40,"Input Box"); 25 | Fl_Window_end(win); 26 | Fl_Window_show(win); 27 | return Fl_run(); 28 | } 29 | -------------------------------------------------------------------------------- /examples/make_tree.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_Types.h" 4 | #include "Fl_WindowC.h" 5 | #include "Fl_TreeC.h" 6 | #include "Fl_Tree_ItemC.h" 7 | #include "Fl_Tree_PrefsC.h" 8 | 9 | int main(int argc, char** argv) 10 | { 11 | char* title = "FLTK Tree Window"; 12 | fl_Window win = (fl_Window)Fl_Window_New_WithLabel(500,500,title); 13 | Fl_Window_begin(win); 14 | fl_Tree tree = (fl_Tree)Fl_Tree_New_WithLabel(50,50,200,200,"Tree"); 15 | Fl_Tree_root_label(tree, "Root Label With Items"); 16 | fl_Tree_Prefs prefs = (fl_Tree_Prefs)Fl_Tree_Prefs_New(); 17 | int i = 0; 18 | fl_Tree_Item item; 19 | for (i = 0; i < 10; i++) { 20 | item = (fl_Tree_Item)Fl_Tree_Item_New_WithPrefs(prefs); 21 | Fl_Tree_Item_set_label(item, "test"); 22 | Fl_Tree_add_with_item_name(tree, item, "test"); 23 | } 24 | Fl_Window_end(win); 25 | Fl_Window_show(win); 26 | return Fl_run(); 27 | } 28 | -------------------------------------------------------------------------------- /examples/make_window.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_Types.h" 3 | #include "Fl_C.h" 4 | #include "Fl_WindowC.h" 5 | 6 | int main(int argc, char** argv) 7 | { 8 | char* title = "FLTK Window"; 9 | fl_Window win = (fl_Window)Fl_Window_New_WithLabel(500,500,title); 10 | Fl_check(); 11 | Fl_Window_show(win); 12 | return Fl_run(); 13 | } 14 | -------------------------------------------------------------------------------- /examples/make_window_fullscreen.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_Types.h" 4 | #include "Fl_WindowC.h" 5 | 6 | int main(int argc, char** argv) 7 | { 8 | fl_Window win = (fl_Window)Fl_Window_NewXY_WithLabel(640,480,100,100,"FLTK Window"); 9 | Fl_Window_show_with_args(win, argc, argv); 10 | Fl_Window_fullscreen(win); 11 | return Fl_run(); 12 | } 13 | -------------------------------------------------------------------------------- /examples/make_window_hide.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_Types.h" 4 | #include "Fl_WindowC.h" 5 | int main(int argc, char** argv) 6 | { 7 | fl_Window win = (fl_Window)Fl_Window_NewXY_WithLabel(640,480,100,100,"FLTK Window"); 8 | Fl_Window_show_with_args(win, argc, argv); 9 | Fl_Window_hide(win); 10 | puts("Should just return. We're showing a window and immediately hiding it."); 11 | Fl_run(); 12 | Fl_Window_Destroy(win); 13 | win = NULL; 14 | if (win == NULL) { puts("Now we've freed the window object"); } 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /examples/make_window_resize.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_Types.h" 4 | #include "Fl_WindowC.h" 5 | int main(int argc, char** argv) 6 | { 7 | fl_Window win = (fl_Window)Fl_Window_NewXY_WithLabel(640,480,200,300,"FLTK Window"); 8 | Fl_Window_show_with_args(win,argc,argv); 9 | Fl_run(); 10 | Fl_Window_resize(win, 100,100, 500,500); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /examples/make_window_with_callback.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_Types.h" 4 | #include "Fl_WindowC.h" 5 | void my_callback(fl_Window w, void* user_data) { 6 | puts("The title of this window is:"); 7 | puts((const char*)Fl_Window_label(w)); 8 | Fl_Window_hide(w); 9 | Fl_Window_Destroy(w); 10 | } 11 | int main(int argc, char** argv) 12 | { 13 | fl_Window win = (fl_Window)Fl_Window_NewXY_WithLabel(640,480,500,500,"FLTK Window"); 14 | Fl_Window_set_callback(win,(fl_Callback*)my_callback); 15 | Fl_Window_show(win); 16 | return Fl_run(); 17 | } 18 | -------------------------------------------------------------------------------- /examples/make_window_with_width_height.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_Types.h" 4 | #include "Fl_WindowC.h" 5 | 6 | int main(int argc, char** argv) 7 | { 8 | fl_Window win = (fl_Window)Fl_Window_NewXY_WithLabel(640,480,500,500,"FLTK Window"); 9 | Fl_Window_show(win); 10 | return Fl_run(); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /examples/menubar-add.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "Fl_C.h" 5 | #include "Fl_WindowC.h" 6 | #include "Fl_Menu_BarC.h" 7 | #include "Fl_Menu_ItemC.h" 8 | #include "FL/filename.H" 9 | #include "filenameC.h" 10 | 11 | void MyMenuCallback(fl_Widget w, void* user_data){ 12 | fl_Menu_Bar bar = (fl_Menu_Bar)w; 13 | fl_Menu_Item item = Fl_Menu_Bar_mvalue(bar); 14 | char ipath[256]; 15 | Fl_Menu_Bar_item_pathname(bar, ipath, sizeof(ipath)); 16 | fprintf(stderr, "callback: You picked '%s'", Fl_Menu_Item_label(item)); // Print item picked 17 | fprintf(stderr, ", item_pathname() is '%s'", ipath); // ..and full pathname 18 | if ( Fl_Menu_Item_flags(item) & (FL_MENU_RADIO|FL_MENU_TOGGLE) ) { // Toggle or radio item? 19 | fprintf(stderr, ", value is %s", Fl_Menu_Item_value(item)?"on":"off"); // Print item's value 20 | } 21 | fprintf(stderr, "\n"); 22 | if ( strcmp(Fl_Menu_Item_label(item), "Google") == 0 ) { flc_open_uri("http://google.com/");} 23 | if ( strcmp(Fl_Menu_Item_label(item), "&Quit") == 0 ) { exit(0); } 24 | } 25 | int main(int argc, char** argv){ 26 | Fl_set_scheme("gtk+"); 27 | fl_Window window = (fl_Window)Fl_Window_New_WithLabel(250,400,"menubar-simple"); 28 | Fl_Window_begin(window); 29 | 30 | fl_Menu_Bar menu = (fl_Menu_Bar)Fl_Menu_Bar_New(0,0,400,45); 31 | Fl_Menu_Bar_add_with_shortcutname(menu,"&File/&Open", "^o", MyMenuCallback); 32 | Fl_Menu_Bar_add_with_shortcutname(menu,"&File/&Open", "^o", MyMenuCallback); 33 | Fl_Menu_Bar_add_with_shortcutname_user_data_flags(menu,"&File/&Save", "^s", MyMenuCallback, 0, FL_MENU_DIVIDER); 34 | Fl_Menu_Bar_add_with_shortcutname(menu,"&File/&Quit", "^q", MyMenuCallback); 35 | Fl_Menu_Bar_add_with_shortcutname(menu,"&Edit/&Copy", "^c", MyMenuCallback); 36 | Fl_Menu_Bar_add_with_shortcutname_user_data_flags(menu,"&Edit/&Paste", "^v", MyMenuCallback, 0, FL_MENU_DIVIDER); 37 | Fl_Menu_Bar_add_with_shortcutname_user_data_flags(menu,"&Edit/Radio 1", 0, MyMenuCallback, 0, FL_MENU_RADIO); 38 | Fl_Menu_Bar_add_with_shortcutname_user_data_flags(menu,"&Edit/Radio 2", 0, MyMenuCallback, 0, FL_MENU_RADIO|FL_MENU_DIVIDER); 39 | Fl_Menu_Bar_add_with_shortcutname_user_data_flags(menu,"&Edit/Toggle 1", 0, MyMenuCallback, 0, FL_MENU_TOGGLE); // Default: off 40 | Fl_Menu_Bar_add_with_shortcutname_user_data_flags(menu,"&Edit/Toggle 2", 0, MyMenuCallback, 0, FL_MENU_TOGGLE); // Default: off 41 | Fl_Menu_Bar_add_with_shortcutname_user_data_flags(menu,"&Edit/Toggle 3", 0, MyMenuCallback, 0, FL_MENU_TOGGLE|FL_MENU_VALUE); // Default: on 42 | Fl_Menu_Bar_add_with_shortcutname(menu,"&Help/Google", 0, MyMenuCallback); 43 | { 44 | fl_Menu_Item item = (fl_Menu_Item)Fl_Menu_Bar_find_item_with_name(menu,"&Edit/Toggle 2"); 45 | if ( item ) Fl_Menu_Item_set(item); 46 | else fprintf(stderr, "'Toggle 2' item not found?!\n"); 47 | } 48 | Fl_Window_end(window); 49 | Fl_Window_show(window); 50 | return Fl_run(); 51 | } 52 | -------------------------------------------------------------------------------- /examples/pixmaps/black_1.xbm: -------------------------------------------------------------------------------- 1 | #define black_1_width 56 2 | #define black_1_height 56 3 | static unsigned char black_1_bits[] = { 4 | 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 5 | 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 6 | 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 7 | 0x00, 0xfc, 0xff, 0xff, 0x1f, 0x00, 0x00, 8 | 0x00, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 9 | 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 10 | 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 11 | 0xe0, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 12 | 0xe0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 13 | 0xf0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 14 | 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 15 | 0xfc, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00, 16 | 0xfc, 0xff, 0xff, 0xff, 0xff, 0x2f, 0x00, 17 | 0xfc, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x00, 18 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x00, 19 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x00, 20 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x00, 21 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01, 22 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x02, 23 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01, 24 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x02, 25 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x01, 26 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x02, 27 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x05, 28 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x02, 29 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x05, 30 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x02, 31 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x05, 32 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x02, 33 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x05, 34 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x02, 35 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x05, 36 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0xaf, 0x02, 37 | 0xfc, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x05, 38 | 0xf8, 0xff, 0xff, 0xff, 0xff, 0xaf, 0x02, 39 | 0xf8, 0xff, 0xff, 0xff, 0xff, 0x57, 0x01, 40 | 0xf8, 0xff, 0xff, 0xff, 0xff, 0xab, 0x02, 41 | 0xf0, 0xff, 0xff, 0xff, 0xff, 0x55, 0x01, 42 | 0xe0, 0xff, 0xff, 0xff, 0xff, 0xab, 0x00, 43 | 0xc0, 0xff, 0xff, 0xff, 0xff, 0x55, 0x01, 44 | 0x80, 0xff, 0xff, 0xff, 0xff, 0xaa, 0x00, 45 | 0x00, 0xff, 0xff, 0xff, 0x5f, 0x55, 0x00, 46 | 0x00, 0xfe, 0xff, 0xff, 0xaf, 0x2a, 0x00, 47 | 0x00, 0xf4, 0xff, 0xff, 0x57, 0x15, 0x00, 48 | 0x00, 0xe8, 0xff, 0xff, 0xaa, 0x0a, 0x00, 49 | 0x00, 0x50, 0xff, 0x7f, 0x55, 0x05, 0x00, 50 | 0x00, 0xa0, 0xaa, 0xaa, 0xaa, 0x02, 0x00, 51 | 0x00, 0x40, 0x55, 0x55, 0x55, 0x01, 0x00, 52 | 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 53 | 0x00, 0x00, 0x50, 0x55, 0x15, 0x00, 0x00, 54 | 0x00, 0x00, 0x80, 0xaa, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/black_2.xbm: -------------------------------------------------------------------------------- 1 | #define black_2_width 56 2 | #define black_2_height 56 3 | static unsigned char black_2_bits[] = { 4 | 0x00, 0x00, 0x0f, 0x3c, 0x00, 0x00, 0x00, 5 | 0x00, 0x40, 0x40, 0x81, 0x00, 0x00, 0x00, 6 | 0x00, 0x10, 0x49, 0x09, 0x02, 0x00, 0x00, 7 | 0x00, 0x44, 0x52, 0x49, 0x08, 0x00, 0x00, 8 | 0x00, 0x90, 0x52, 0x25, 0x01, 0x00, 0x00, 9 | 0x80, 0x94, 0x54, 0x95, 0x44, 0x00, 0x00, 10 | 0x40, 0x24, 0x01, 0x40, 0x92, 0x00, 0x00, 11 | 0x20, 0x49, 0xfc, 0x0f, 0x09, 0x01, 0x00, 12 | 0x00, 0x11, 0x57, 0x35, 0x64, 0x00, 0x00, 13 | 0x40, 0xc2, 0x00, 0xc0, 0x10, 0x00, 0x00, 14 | 0x88, 0x64, 0x55, 0x55, 0x89, 0x05, 0x00, 15 | 0x20, 0x11, 0x00, 0x08, 0x42, 0x00, 0x00, 16 | 0x44, 0x58, 0x55, 0x55, 0x21, 0x0b, 0x00, 17 | 0x90, 0x04, 0x80, 0x0a, 0x80, 0x00, 0x00, 18 | 0x22, 0x56, 0x55, 0x55, 0x45, 0x14, 0x00, 19 | 0x48, 0x02, 0xa8, 0x2a, 0x00, 0x03, 0x00, 20 | 0x11, 0x55, 0x55, 0x55, 0x95, 0x28, 0x00, 21 | 0x21, 0x81, 0xaa, 0x2a, 0x00, 0x26, 0x00, 22 | 0x8d, 0x55, 0x55, 0x55, 0x15, 0x21, 0x00, 23 | 0xb1, 0xe0, 0xaa, 0xaa, 0x00, 0x20, 0x00, 24 | 0x80, 0xf5, 0x55, 0x55, 0x15, 0x07, 0x00, 25 | 0xbe, 0xf0, 0xab, 0xaa, 0x00, 0x00, 0x00, 26 | 0x80, 0xf5, 0x55, 0x55, 0x15, 0x1f, 0x00, 27 | 0xbe, 0xe0, 0xab, 0xaa, 0x02, 0x00, 0x00, 28 | 0x80, 0xf5, 0x57, 0x55, 0x15, 0x1f, 0x00, 29 | 0xb8, 0xc0, 0xaf, 0xaa, 0x00, 0x00, 0x00, 30 | 0x81, 0xd5, 0x57, 0x15, 0x14, 0x23, 0x00, 31 | 0xa1, 0x80, 0xaf, 0x0a, 0x00, 0x2c, 0x00, 32 | 0x19, 0xd5, 0x5f, 0x01, 0x14, 0x21, 0x00, 33 | 0x45, 0x01, 0xaf, 0x00, 0x00, 0x22, 0x00, 34 | 0x30, 0x56, 0x1f, 0x40, 0x85, 0x04, 0x00, 35 | 0x8a, 0x02, 0x0e, 0x00, 0x00, 0x11, 0x00, 36 | 0x40, 0x54, 0x0f, 0x54, 0x45, 0x02, 0x00, 37 | 0x34, 0x09, 0x04, 0x00, 0x80, 0x08, 0x00, 38 | 0x80, 0x40, 0x45, 0x55, 0x21, 0x01, 0x00, 39 | 0x68, 0x04, 0x00, 0x00, 0x48, 0x04, 0x00, 40 | 0x00, 0x82, 0x55, 0x95, 0x90, 0x00, 0x00, 41 | 0x80, 0x09, 0x02, 0x20, 0x22, 0x00, 0x00, 42 | 0x20, 0x24, 0xa8, 0x8a, 0x24, 0x01, 0x00, 43 | 0x40, 0x92, 0x00, 0x20, 0x89, 0x00, 0x00, 44 | 0x80, 0x48, 0xaa, 0x4a, 0x4a, 0x00, 0x00, 45 | 0x00, 0x20, 0xa9, 0x52, 0x02, 0x00, 0x00, 46 | 0x00, 0x84, 0xa4, 0x92, 0x08, 0x00, 0x00, 47 | 0x00, 0x10, 0xa4, 0x24, 0x02, 0x00, 0x00, 48 | 0x00, 0x40, 0xa0, 0x80, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x0f, 0x3c, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/black_3.xbm: -------------------------------------------------------------------------------- 1 | #define black_3_width 56 2 | #define black_3_height 56 3 | static unsigned char black_3_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 14 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 15 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 16 | 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 17 | 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 18 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 19 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 20 | 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 21 | 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 22 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 23 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 24 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 25 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 26 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 27 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 28 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 29 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 30 | 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 31 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 32 | 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 33 | 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 35 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 36 | 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 37 | 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 38 | 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x00, 39 | 0x00, 0x20, 0x00, 0x00, 0x01, 0x00, 0x00, 40 | 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 41 | 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00, 42 | 0x00, 0x00, 0x54, 0x05, 0x00, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/black_4.xbm: -------------------------------------------------------------------------------- 1 | #define black_4_width 56 2 | #define black_4_height 56 3 | static unsigned char black_4_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 14 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 15 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 16 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 17 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 18 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 19 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 22 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 24 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 25 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 29 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 30 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 31 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 32 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 33 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 36 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/blackking_1.xbm: -------------------------------------------------------------------------------- 1 | #define blackking_1_width 56 2 | #define blackking_1_height 56 3 | static unsigned char blackking_1_bits[] = { 4 | 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0x00, 5 | 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 6 | 0x00, 0xf8, 0xff, 0xff, 0x03, 0x00, 0x00, 7 | 0x00, 0xfc, 0xff, 0xff, 0x1f, 0x00, 0x00, 8 | 0x00, 0xfe, 0xff, 0xff, 0x3f, 0x00, 0x00, 9 | 0x80, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 10 | 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 11 | 0xe0, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 12 | 0xe0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 13 | 0xf0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 14 | 0xf8, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x00, 15 | 0xfc, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00, 16 | 0xfc, 0xff, 0xff, 0xff, 0xff, 0x2f, 0x00, 17 | 0xfc, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x00, 18 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x00, 19 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x01, 20 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x02, 21 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x05, 22 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x0a, 23 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x15, 24 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x0a, 25 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x15, 26 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x2a, 27 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x55, 28 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x2a, 29 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x55, 30 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0x2a, 31 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x55, 32 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xaa, 33 | 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x55, 34 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xaa, 35 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x55, 36 | 0xfe, 0xff, 0xff, 0xff, 0xff, 0xaf, 0xaa, 37 | 0xfc, 0xff, 0xff, 0xff, 0xff, 0x5f, 0x55, 38 | 0xf8, 0xff, 0xff, 0xff, 0xff, 0xaf, 0xaa, 39 | 0xf8, 0xff, 0xff, 0xff, 0xff, 0x57, 0x55, 40 | 0xf8, 0xff, 0xff, 0xff, 0xff, 0xab, 0xaa, 41 | 0xf0, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 42 | 0xe0, 0xff, 0xff, 0xff, 0xff, 0xab, 0xaa, 43 | 0xc0, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 44 | 0x80, 0xff, 0xff, 0xff, 0xff, 0xaa, 0x2a, 45 | 0x00, 0xff, 0xff, 0xff, 0x5f, 0x55, 0x55, 46 | 0x00, 0xfe, 0xff, 0xff, 0xaf, 0xaa, 0x2a, 47 | 0x00, 0xf4, 0xff, 0xff, 0x57, 0x55, 0x15, 48 | 0x00, 0xe8, 0xff, 0xff, 0xaa, 0xaa, 0x2a, 49 | 0x00, 0x50, 0xff, 0x7f, 0x55, 0x55, 0x15, 50 | 0x00, 0xa0, 0xaa, 0xaa, 0xaa, 0xaa, 0x0a, 51 | 0x00, 0x40, 0x55, 0x55, 0x55, 0x55, 0x05, 52 | 0x00, 0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, 53 | 0x00, 0x00, 0x55, 0x55, 0x55, 0x55, 0x01, 54 | 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 55 | 0x00, 0x00, 0x54, 0x55, 0x55, 0x55, 0x00, 56 | 0x00, 0x00, 0xa8, 0xaa, 0xaa, 0x2a, 0x00, 57 | 0x00, 0x00, 0x40, 0x55, 0x55, 0x15, 0x00, 58 | 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x02, 0x00, 59 | 0x00, 0x00, 0x00, 0x50, 0x15, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/blackking_2.xbm: -------------------------------------------------------------------------------- 1 | #define blackking_2_width 56 2 | #define blackking_2_height 56 3 | static unsigned char blackking_2_bits[] = { 4 | 0x00, 0x00, 0x0f, 0x3c, 0x00, 0x00, 0x00, 5 | 0x00, 0x40, 0x40, 0x81, 0x00, 0x00, 0x00, 6 | 0x00, 0x10, 0x49, 0x09, 0x02, 0x00, 0x00, 7 | 0x00, 0x44, 0x52, 0x49, 0x08, 0x00, 0x00, 8 | 0x00, 0x90, 0x52, 0x25, 0x01, 0x00, 0x00, 9 | 0x80, 0x94, 0x54, 0x95, 0x44, 0x00, 0x00, 10 | 0x40, 0x24, 0x01, 0x40, 0x92, 0x00, 0x00, 11 | 0x20, 0x49, 0xfc, 0x0f, 0x09, 0x01, 0x00, 12 | 0x00, 0x11, 0x57, 0x35, 0x64, 0x00, 0x00, 13 | 0x40, 0xc2, 0x00, 0xc0, 0x10, 0x00, 0x00, 14 | 0x88, 0x64, 0xd5, 0x55, 0x89, 0x05, 0x00, 15 | 0x20, 0x11, 0xc0, 0x00, 0x42, 0x00, 0x00, 16 | 0x44, 0x58, 0x57, 0x74, 0x21, 0x0b, 0x00, 17 | 0x90, 0x04, 0x03, 0x30, 0x80, 0x00, 0x00, 18 | 0x22, 0x76, 0x51, 0x15, 0x47, 0x14, 0x00, 19 | 0x48, 0x32, 0x08, 0x02, 0x03, 0x03, 0x00, 20 | 0x11, 0x15, 0x5d, 0x57, 0x91, 0x28, 0x00, 21 | 0x21, 0x01, 0x0c, 0x03, 0x00, 0x26, 0x00, 22 | 0x8d, 0x55, 0xcf, 0xd3, 0x15, 0x21, 0x00, 23 | 0xb1, 0x18, 0x86, 0xe1, 0x00, 0x20, 0x00, 24 | 0x80, 0x5d, 0xd7, 0x75, 0x11, 0x07, 0x00, 25 | 0xbe, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 26 | 0x80, 0x75, 0x55, 0x55, 0x11, 0x1f, 0x00, 27 | 0xbe, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | 0x80, 0x75, 0x55, 0x55, 0x10, 0x1f, 0x00, 29 | 0xb8, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 30 | 0x81, 0x75, 0x55, 0x55, 0x14, 0x23, 0x00, 31 | 0xa1, 0x60, 0x00, 0x00, 0x00, 0x2c, 0x00, 32 | 0x19, 0xd5, 0x55, 0x55, 0x14, 0x21, 0x00, 33 | 0x45, 0xc1, 0x00, 0x00, 0x00, 0x22, 0x00, 34 | 0x30, 0xd6, 0x00, 0x00, 0x85, 0x04, 0x00, 35 | 0x8a, 0x82, 0x00, 0x00, 0x00, 0x11, 0x00, 36 | 0x40, 0x54, 0x00, 0x00, 0x45, 0x02, 0x00, 37 | 0x34, 0x09, 0x00, 0x00, 0x80, 0x08, 0x00, 38 | 0x80, 0x40, 0x55, 0x55, 0x21, 0x01, 0x00, 39 | 0x68, 0x04, 0x00, 0x00, 0x48, 0x04, 0x00, 40 | 0x00, 0x82, 0x55, 0x95, 0x90, 0x00, 0x00, 41 | 0x80, 0x09, 0x02, 0x20, 0x22, 0x00, 0x00, 42 | 0x20, 0x24, 0xa8, 0x8a, 0x24, 0x01, 0x00, 43 | 0x40, 0x92, 0x00, 0x20, 0x89, 0x00, 0x00, 44 | 0x80, 0x48, 0xaa, 0x4a, 0x4a, 0x00, 0x00, 45 | 0x00, 0x20, 0xa9, 0x52, 0x02, 0x00, 0x00, 46 | 0x00, 0x84, 0xa4, 0x92, 0x08, 0x00, 0x00, 47 | 0x00, 0x10, 0xa4, 0x24, 0x02, 0x00, 0x00, 48 | 0x00, 0x40, 0xa0, 0x80, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x0f, 0x3c, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/blackking_3.xbm: -------------------------------------------------------------------------------- 1 | #define blackking_3_width 56 2 | #define blackking_3_height 56 3 | static unsigned char blackking_3_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 14 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 15 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 16 | 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 17 | 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 18 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 19 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 20 | 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 21 | 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 22 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 23 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 24 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 25 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 26 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 27 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 28 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 29 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 30 | 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 31 | 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 32 | 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 33 | 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 35 | 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 36 | 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 37 | 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 38 | 0x00, 0x10, 0x00, 0x00, 0x02, 0x00, 0x00, 39 | 0x00, 0x20, 0x00, 0x00, 0x01, 0x00, 0x00, 40 | 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 41 | 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x00, 42 | 0x00, 0x00, 0x54, 0x05, 0x00, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/blackking_4.xbm: -------------------------------------------------------------------------------- 1 | #define blackking_4_width 56 2 | #define blackking_4_height 56 3 | static unsigned char blackking_4_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 13 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 14 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 15 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 16 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 17 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 18 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 19 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 22 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 24 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 25 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 29 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 30 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 31 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 32 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 33 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 36 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 44 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 45 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/blast.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * blast_xpm[] = { 3 | "32 32 32 1", 4 | " c #905518", 5 | ". c #9F580E", 6 | "+ c #A36526", 7 | "@ c #AF6519", 8 | "# c #BF7429", 9 | "$ c #C77622", 10 | "% c #B67B3C", 11 | "& c #D07518", 12 | "* c #D88836", 13 | "= c #E48628", 14 | "- c #F28514", 15 | "; c #FF951C", 16 | "> c #FA9835", 17 | ", c #FF982A", 18 | "' c #F49F48", 19 | ") c #FFA82D", 20 | "! c #FFA93F", 21 | "~ c #FFBA1C", 22 | "{ c #FFB936", 23 | "] c #FFBA4C", 24 | "^ c #FFCA42", 25 | "/ c #FFD329", 26 | "( c #FFCF5E", 27 | "_ c #FFD94C", 28 | ": c #FFE946", 29 | "< c #FFFB3E", 30 | "[ c #FFFB55", 31 | "} c #FEFC69", 32 | "| c #FFFE82", 33 | "1 c #FFFFA3", 34 | "2 c #FEFFCB", 35 | "3 c #FEFFFC", 36 | " % . ....@@@#@@.+.+++% ", 37 | " %%++++.....@######@@@@.++ % ", 38 | " %%% %++@@.@@@#$$#######@++++%% ", 39 | " %%+%+####@@$&&=*=&&$$####@++%%+", 40 | "+%+%#####&&&&&==='===*$$###%%%%+", 41 | "%+%%%%**=*&&&&>,>,>-=>==*$*##%%%", 42 | " %#****'=>---,))!),>>>==***#%#+", 43 | " @%*'''>>>>;;,{{{))))>>>''**#%+", 44 | " ..@#*'!]]]{)){^__^^{]!!!'''###+", 45 | " ..@$=']]((^^~~:::/__^{((!>**##@", 46 | "....&&=>(_|[::/<}[<[::_((!>==###", 47 | "....&&--!_}|}[<[}[}}}||_]!>>**##", 48 | "@@$$&&--;{:|1|[<|}|}||}_^]>>=*##", 49 | "##$$=-,;)~~<121<2|121}}:^])>=*$#", 50 | "#*'''!]{^_<<<1313332|}}}^{!>>*##", 51 | "%*'']((|}}||||<333321|[[_^]>==*#", 52 | "*''''((||112333333321|}[_^]!>=*#", 53 | "%%*''!]^_[[[}<13332}<[<:_])>>*$#", 54 | "##*==,,)~_:<[|212311}[>=&$@@", 59 | " .@@$&'!({;;{/}::/~/_^)),>=*$#@+", 60 | " ..@$=''>,-;)^__~^{)^]),,==*$#@@", 61 | ". @##*'==&--){({));;,{>>==$$#@++", 62 | "%++#%**$&&--,!));;;-->>=&$$##@+%", 63 | " +%%##@@@@&=>>>>>>=-==='$$#@@+++", 64 | " %%+@@..&.$&='==-&&&&&$*$#@@.+% ", 65 | " %%+ ....@$$*==&$&&&@$$##@@+ % ", 66 | " % ....@#*#$$$#@@@@@##+@++ ", 67 | " ..@####@@@@@..+@++% "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/block.xcf.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deech/fltkc/a59529b23651c5c3b982068ad7cc3671ff662f9a/examples/pixmaps/block.xcf.gz -------------------------------------------------------------------------------- /examples/pixmaps/blue.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * blue_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #0000A5", 6 | "+ c #020681", 7 | "@ c #0A008F", 8 | "# c #0001B2", 9 | "$ c #0100BA", 10 | "% c #0000D0", 11 | "& c #0C00C4", 12 | "* c #0008C4", 13 | "= c #0B00DB", 14 | "- c #13252E", 15 | "; c #171F44", 16 | "> c #1718B3", 17 | ", c #1616C2", 18 | "' c #2628CF", 19 | ") c #2C2BC6", 20 | "! c #2D30BD", 21 | "~ c #3D40D1", 22 | "{ c #4342BC", 23 | "] c #4344CA", 24 | "^ c #5253E1", 25 | "/ c #5858D4", 26 | "( c #5F5ECF", 27 | "_ c #6A69E7", 28 | ": c #6E6EDD", 29 | "< c #7273D2", 30 | "[ c #7E7FDD", 31 | "} c #7E7FEC", 32 | "| c #8D8DDF", 33 | "1 c #8F90EF", 34 | "2 c #9D9EED", 35 | "3 c #A6A6E8", 36 | " ;+.*$##$$**$*$#$*&&.+; ", 37 | " -@&)_133333333333333|:!$@- ", 38 | " ;%%}22122222222233333333['$; ", 39 | " -&'1111111|2|21111|2223|332'&- ", 40 | " @*}}}}1}}}1}1111111[|[||||||*. ", 41 | ";&/}[}}}}}}}[[[}}}}}[}[[||||[:&;", 42 | "+'::::_____:::<::__}_}:<<<<<[<)+", 43 | ">)/_/_____::(::::_____:(<<<<<<].", 44 | "*^//^/////(((((//_^_^_///(((((/$", 45 | "#]]]]^^{/{{{{/{//^^^^^^///{(((($", 46 | ".]~~~~]{{{{{{{]{]~~~~~~~]{]{{{(.", 47 | "#))))!!!{{{]!~!!~~'~''~~~]{{{{{.", 48 | "#))))!!!@!>!!))))''''''~)!!!{{+.", 49 | "$,,>>>@!>>)>,'''''''''''))!>!!!.", 50 | "$,,#>>>>.>,,&*%*'*''*',,,,,>>>>#", 51 | "&%%$#...#&&%*%***%%&*$,***,>#>>#", 52 | "$&%&*###&&%%&&&&,*&*,##$*$$#$$#$", 53 | "$&%%$$$*&%&**$$$&&&&&$#$***#,#.#", 54 | "$$$&$*&%%=&&$##$$**&&$**&&&$$#..", 55 | ".#$$&&%%%%%&,....##$#$$&%%&&$#.#", 56 | ".#$$&%%===%%&#.....###$&%%%&&#.#", 57 | "$$&&%=====%%$##.@..#.##&&&%%&$$#", 58 | "$$&&%==%==%&$###.....##$%&%&&$$$", 59 | "$$$&&%%%%%&&$$###..###$$&%&%&&$$", 60 | ".$$&&&&$$&$$*&&*$$#$$$$$$%%%%%&.", 61 | "+$$$$&####$&$&&&&&$$&$$$$&%=%%=+", 62 | ";##$$$#....$$&&&$&&%&&$$*&%==%%;", 63 | " @$,#$#.@..##.#$&&%%%&$&&=%%%%. ", 64 | " -$*$&&$.......#&&&%&&$&%==%%&- ", 65 | " ;$&&$#...#...$&%%%&&$&%=%=%; ", 66 | " -@%&$#..#...#$%&&&&&&&=%.- ", 67 | " ;+.#$#....#&&%%&&&&#+; "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/blue_bomb.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * blue_bomb_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #010047", 6 | "+ c #00033E", 7 | "@ c #010345", 8 | "# c #010577", 9 | "$ c #0000A4", 10 | "% c #0001B7", 11 | "& c #0000C3", 12 | "* c #0000D0", 13 | "= c #13252E", 14 | "- c #1A2147", 15 | "; c #1E1E57", 16 | "> c #2023BC", 17 | ", c #2526CD", 18 | "' c #343364", 19 | ") c #363699", 20 | "! c #3237C5", 21 | "~ c #373BB4", 22 | "{ c #474875", 23 | "] c #4E4FD4", 24 | "^ c #5252C6", 25 | "/ c #5B5A85", 26 | "( c #6D6D94", 27 | "_ c #6666CE", 28 | ": c #6465DE", 29 | "< c #6E6CAC", 30 | "[ c #7B7CDA", 31 | "} c #7C7DEB", 32 | "| c #8D8DDF", 33 | "1 c #8F90EF", 34 | "2 c #9D9EED", 35 | "3 c #A6A6E8", 36 | " -#$&%%%%%&&&&%%%&&&$#- ", 37 | " =$*,:133333333333333|}>%$= ", 38 | " -&,}22122222322233333333[>%- ", 39 | " =&,}111111|2|21111|22322332,&= ", 40 | " $,[1}1}1}}1}1111111[1|||<|||&$ ", 41 | "-%]}}}}}}}}}[[[}}}}}}[[[||||1:&-", 42 | "#,:_}:::}::[<((((((<[}}[[[[<[[,#", 43 | "%!:::::::_<(((((((((/<_:___[__]$", 44 | "&]]]]]]]://///(////////_^::___]%", 45 | "%]]]]]]^{{{/{{/{/{)''-{''''''''''''{')]~~~~$", 48 | "%,>,!>)-'-'-''''''';''''')!!~~~$", 49 | "&,,$>>--;;-;;;;;;;;;);;;;->>>#!$", 50 | "&&&,$$;+;+;+;@;;.;;;;;;;;;%>,>>%", 51 | "%&&&$$++@+..@...;..@.@;@.;%,$%$%", 52 | "&&*&&%+++..@@@@@@@@@+@++@+%%%%%%", 53 | "&&&&%%+@+.@@+++@++@@@++++@&%%%$%", 54 | "%&&&&&+....+++++@+@+@+@@@@&%%%$$", 55 | "$%%&%&#.@..@+++++++++++@@#&&%$$$", 56 | "$%%%&*$....@+++++++++++@.$*&&%%$", 57 | "%%&&***#...@+++-++++++++#***&%%%", 58 | "&%&&***&...@+++++++++++@$&**&%%%", 59 | "&%%&****$.@@+++++++++++$&&*&&&&&", 60 | "$%%&&&&%&$#+@@+++++++#$%&&****&$", 61 | "#%%%%&%%$%$$#@.@@@+#$%%%%&*****#", 62 | "-%%%%%%$$$$%%%&%%&&&&%%&&&*****-", 63 | " $%%%&$$$$$$%$$%&&**&&%&******$ ", 64 | " =%%&&&$$$$$$$$%&&***%%&*****&= ", 65 | " -&&&&%$$$$$$$%%***&&&&****&- ", 66 | " =$&%%%$%$$$$%&&&&&&&&***$= ", 67 | " -#$%%%%$$$%%&&&&&&&%#- "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/cyan.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * cyan_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #143144", 6 | "+ c #0A4350", 7 | "@ c #038080", 8 | "# c #029795", 9 | "$ c #00A3A5", 10 | "% c #00ABAC", 11 | "& c #02B3B5", 12 | "* c #00BBBB", 13 | "= c #00C0C0", 14 | "- c #19B9BB", 15 | "; c #33B5B5", 16 | "> c #00CCCB", 17 | ", c #12C5C5", 18 | "' c #47B2B1", 19 | ") c #1AC9C9", 20 | "! c #09D2D1", 21 | "~ c #37C9CA", 22 | "{ c #46C5C6", 23 | "] c #24D9D8", 24 | "^ c #5CC5C3", 25 | "/ c #4BD0D1", 26 | "( c #55D8DA", 27 | "_ c #72D4D3", 28 | ": c #53E3E3", 29 | "< c #66E0E2", 30 | "[ c #7EE2E1", 31 | "} c #70ECED", 32 | "| c #94E0E1", 33 | "1 c #8DEFED", 34 | "2 c #A1ECEC", 35 | "3 c #ADE8E6", 36 | " +@$=*&&&***=*&&&*==$@+ ", 37 | " .#>![123333222233323|<~*#. ", 38 | " +,]}1211212222212232333||**+ ", 39 | " .,]1211111222221112|||||3||>>. ", 40 | " #)[11111}}11[11111111[|||||[!# ", 41 | "+*<}<<}}1}1}[[[1}1}}1[[___|_|<>+", 42 | "@)_[[<}}}}}<[__<<}}}}1[___|^|_)@", 43 | "%](((<<<<<__/___[}}}}:[__^_^^_^%", 44 | "-(((((((((_{{_{/_(}:}<<<(___^^/*", 45 | "&////(/{{{{^/{{^/]:::::(_(/{^{^&", 46 | "%{//!/{;';{;{{~{{/]:]:]/~~/{^{;%", 47 | "%==,~,*;;;;'*~~~~~/!]]()~{{{;''#", 48 | ";>/**;;;&;-;;~,)))//!!]~=---;';$", 49 | "*>=*;%;%;--*,)!)!>)!~!))~=~--%;%", 50 | ";),=;%%%--))))!))!)))~,)),{--&;%", 51 | "=)>**%$%*=)>!>)),,))--*=)=***;**", 52 | "*)!>**%&=)!,,,===,,,*;*;==**&*&&", 53 | "*,>,=***>!),**-*=,,>=***,=*&*&%&", 54 | "*&==**,>>!>=&%&&***=***=>,=*%%%%", 55 | "%****>>!!!!>*%%%%%&*&**,>>>==%$$", 56 | "%%*==>!]]!!>*%%$$%%%*%=,>>>>>*%%", 57 | "%==,!]]]]]!>*&$$##$%%%&*,>>>*=&;", 58 | "**=>!]]]]]!>**%$$#%%%%*=,>>>=**&", 59 | "***,)!!!!!,****=%%#%%%&*=>>>>==*", 60 | "$*&=,),**,=*======***==**,>>>>>%", 61 | "@=&-*=&%%&&*==>>======*&=,>]]!!@", 62 | "+&&=&*&%$%%*****==,>,=*==!!!]]!+", 63 | " #&&=*&$$#$%%%%*=,>>>=*=,!!!!!# ", 64 | " .&====%%$%%%$$%=>>>)=*,!]]!!,. ", 65 | " +*,==*%#$$%#%*=>!>,=-,!]]!!+ ", 66 | " .#,=*%%%%$#$&=,>,,,=,)!]$. ", 67 | " +@$&*%%%$$%,,,,,,,,%@+ "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/cyan_bomb.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * cyan_bomb_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #003A3A", 6 | "+ c #133244", 7 | "@ c #004241", 8 | "# c #0A4551", 9 | "$ c #084948", 10 | "% c #1B5353", 11 | "& c #006C6D", 12 | "* c #286261", 13 | "= c #396767", 14 | "- c #0F8080", 15 | "; c #019795", 16 | "> c #507B7C", 17 | ", c #00A7A9", 18 | "' c #5D8989", 19 | ") c #00B7B7", 20 | "! c #00C1C1", 21 | "~ c #2FB2B3", 22 | "{ c #6D9A9A", 23 | "] c #00CAC9", 24 | "^ c #4AB4B3", 25 | "/ c #05D4D2", 26 | "( c #36C8C9", 27 | "_ c #53C4C3", 28 | ": c #46D3D4", 29 | "< c #61D3D3", 30 | "[ c #75CECE", 31 | "} c #6FE2E1", 32 | "| c #82DFDE", 33 | "1 c #94E0E1", 34 | "2 c #89EFED", 35 | "3 c #A2ECEC", 36 | " #-,!))~))!)!!)~)!!!,-# ", 37 | " +;]:}2333333333333331<();+ ", 38 | " #!/}23333333333333333333[!!# ", 39 | " +!/322222221332223311111111:!+ ", 40 | " ;:2222222222|23222233111111|/; ", 41 | "#!:}|}222222|||}22222}|1[1[[1}]#", 42 | "-:<}}}}}}}}[^{{{{{{[[2}|[[[[[|!-", 43 | ",:}:}:}}}<{'''''''{'{{[<<|[[[<_,", 44 | "!:<<:}::_'>'>>'>'''''''[<<<[_<:!", 45 | ")(:::::^>>>>>>>>>>>''''>_::____~", 46 | ",((:::(>===>=>=>>>=>>>>>'(:___^,", 47 | "~(((](;===#========&&=*=*^(_^^~;", 48 | ")](()_&%%==%=%===*===*==*-~)^~~,", 49 | "!!!)~,=#.%%#%%%%*%******%=())~~,", 50 | ")]()~,.%%%%%%%%%%%%%%%%%%%()))~)", 51 | "(!]!)^.....$%$$$$$$$$$$$$$)))))~", 52 | "!]:])~...%$$.@#@@@@@.@.$@@))))))", 53 | ")]]]!(.$$.@@..@.@@@@@@..@$)))))~", 54 | "~!)!)!.$$%$.@....@#@.@@@#@()),,,", 55 | ",)!~!(&@@@@$...........@$&]!)),,", 56 | ")))!]]~$$$@$.........@@@$,:]!),,", 57 | "~)!!///&$$$@@...........&]]]!)))", 58 | "))!!://!%$$@...........@,]/]])))", 59 | "!))!///],@#$..........@;]]]]]!]!", 60 | ",)!)!!!!!,&.@#@......*,)!]]]/]!,", 61 | "-)~!!!)),));&@@@$.@&;!)))!/////-", 62 | "#)~))),,;,,)))!)!!:]]!!!!]/////#", 63 | " ;))))),;,,)~~,)!!]/]!)!]/////; ", 64 | " +)!!!!),,,,,,,)!]]/!()!/////!+ ", 65 | " #)]!)),,,,,,,)!!/!]!)!////]# ", 66 | " +;]!),,,,,;,)!]]!!!!!]//,+ ", 67 | " #-,))));,,,!!]!]!!!)-# "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/gray.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * gray_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #2C393F", 6 | "+ c #394649", 7 | "@ c #666967", 8 | "# c #737572", 9 | "$ c #7A7C79", 10 | "% c #828481", 11 | "& c #878986", 12 | "* c #8C8E8B", 13 | "= c #90928F", 14 | "- c #939592", 15 | "; c #979996", 16 | "> c #999B98", 17 | ", c #9C9E9A", 18 | "' c #9FA19E", 19 | ") c #A1A0A4", 20 | "! c #A3A5A2", 21 | "~ c #A6A8A5", 22 | "{ c #A9ABA8", 23 | "] c #A9ACAF", 24 | "^ c #ABADAA", 25 | "/ c #AFB1AE", 26 | "( c #B3B5B3", 27 | "_ c #B9BBB8", 28 | ": c #BABDC0", 29 | "< c #C1C3BF", 30 | "[ c #C2C3C7", 31 | "} c #C7C9C6", 32 | "| c #CBCDCB", 33 | "1 c #D1D3D0", 34 | "2 c #D9DBD8", 35 | "3 c #DFE1DE", 36 | " +@%;-**=---;-=*=;>>%@+ ", 37 | " .$':[2332233333222231[]-#. ", 38 | " +)(|33333222333332222221[)-+ ", 39 | " .;(22233333121333322|12|1|2]'. ", 40 | " #]|221222221112233222[2||||1]$ ", 41 | "+)[|[[2[3[3[2[1[[2[222||[[[[|<)+", 42 | "@~[[||[111[[|[[|2221[2[|}<<[[|~@", 43 | "%:|<[|[[[|[[[:[[[[[21|[[[_:((_]&", 44 | "-(::[[[[[:((((]:[[|[||<<[_<:::];", 45 | "=((((_(({^]](]]](<[[|[[:(:((]((*", 46 | "&]]((()))!')^(^^]([[<<__(]({~)]%", 47 | "*~^]])'>-))'){)]^]((:_:]]{)))>)%", 48 | "=)~!''>)--);){{]^{{^(((])~~!)==%", 49 | ")~)))=**);;)']]{]]]]]]]{~!,)=)-&", 50 | "-',-**&*=)>)!{]~~~~!)!))])'>-==*", 51 | ")))))&&&=;!~])')))))>)>,'';))-)*", 52 | "-'!)=**)=)!)')-;>,''-=*-))**==)&", 53 | "),);))*))]);)*--)>)))-==-)=)*&**", 54 | "*))-==)'!{!;*&**==---)=)>))*)%&&", 55 | "%&==))!)]])))*&&**&)**))!'-))&%%", 56 | "**)=)){^{^~)=&&%$%&&**=)))]))**&", 57 | "**-)!{]]]]{)))&$%%%*&&*;'''>))**", 58 | ")=),]((((]!)*&&%$%$&&*)-))]);*)*", 59 | "==*)'!!'!~)*)))&)&&&&&*)>'')))-)", 60 | "%)*))))-);)-==)))&)&)*=-))!!))'%", 61 | "@=*=--*&&*==));-)=)=)))*->!]^^]@", 62 | "+=*=--*%$%&)&-)-))));-=)-){{]]]+", 63 | " #)*)*)&%$%&*&&*=;)!))*)){]]{~# ", 64 | " .*)*)*&&%&%%%%));]'))*>]{{])). ", 65 | " .=))))&%%&%%$&;,!)>-))!]]{~+ ", 66 | " .#;=&*)$&%%%)))!');-)'{]$. ", 67 | " +@$$)&)%$$&-,))>),;&@+ "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/gray_bomb.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * gray_bomb_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #2C2E2B", 6 | "+ c #313330", 7 | "@ c #2E393E", 8 | "# c #363835", 9 | "$ c #3B3A3D", 10 | "% c #3B3D3B", 11 | "& c #3B464A", 12 | "* c #454644", 13 | "= c #48464A", 14 | "- c #50514F", 15 | "; c #585A57", 16 | "> c #616260", 17 | ", c #686967", 18 | "' c #70716E", 19 | ") c #787A78", 20 | "! c #818380", 21 | "~ c #868885", 22 | "{ c #8B8D8A", 23 | "] c #8F908D", 24 | "^ c #939491", 25 | "/ c #969895", 26 | "( c #9B9D9A", 27 | "_ c #A1A3A0", 28 | ": c #A8AAA7", 29 | "< c #B0B3B0", 30 | "[ c #B9BBB8", 31 | "} c #C1C2C0", 32 | "| c #C9CBC8", 33 | "1 c #D2D3D1", 34 | "2 c #D9DBD8", 35 | "3 c #DFE1DE", 36 | " &,!/^]]]^////]]]/((!,& ", 37 | " @)_<12322232333322221}:^'@ ", 38 | " &(<133333313233332222221}_/& ", 39 | " @/}221233322113333221111111<_@ ", 40 | " )_1112223321212223212111}1}1<) ", 41 | "&^}1111111111}1111221111}}}}1}_&", 42 | ",:}}}111111<:]~]^^^<}11}}}}}}}:,", 43 | "]<}}}}}}}}]~))~)~~]~]^}}}}}<<}<~", 44 | "/}<}}}}}_)))))))))~)~)~<}}}<<<<^", 45 | "]<<<<}<_,',,'''))))))))):<}<<<<]", 46 | "]<<<<<<,>>>,,,>>>,,),,,,)<<<_::~", 47 | "]_::<_~>->->->>>>>>>,,,,>^__:^/)", 48 | "^___((,====-=-->=>>=>=>>=)_(^(^!", 49 | "^:_(^^=-=-=-=-==-==>-----=__/^^]", 50 | "^_((^~$$*%=*==-=--======-=_(^(^]", 51 | "^__(]].+$$$%%*$$$$$*$@*%%=((^^^]", 52 | "/_:_^]@.+$$$+$++$$+$$$$$+$^^^^]]", 53 | "^___^^..$##++..$++$+....$$^]^]]]", 54 | "]^^(^($+$$$$.....++$.$.@$.(^]]~~", 55 | "~]^^//>+$++.$@.@.@......$>_(]]!~", 56 | "]]^(__~@$$$$......$.$@$+$)<_^]~~", 57 | "]^((_<<;##$.$..........$=__:(^]]", 58 | "^^((:<<^&#$$...........$~____^^]", 59 | "^^^((___!$+.$.@.....@.$)(___(((^", 60 | "~^^^__(^^~=$..$.@....=)^/_:::_:~", 61 | ">^^^/^^]]]])=@.$..$=)^^^^(_<:<:,", 62 | "&]]^^]]))~~^^]]]^/__:(^^(__::::&", 63 | " )^]^^]]))~~]]]^^(_:_^(^_:<:::) ", 64 | " @^^(^^]~~])~)~]((___^/(:<_<_(@ ", 65 | " &^__(]])~]~)~^^_:__(^(_:<:_& ", 66 | " @)((]]]~~)~)^(__(((((_:<)@ ", 67 | " &,)]]]]])!]^(__(_((~>& "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/green.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * green_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #022D01", 6 | "+ c #004300", 7 | "@ c #007F00", 8 | "# c #009400", 9 | "$ c #00A301", 10 | "% c #00AA00", 11 | "& c #00B600", 12 | "* c #04BC0A", 13 | "= c #00C100", 14 | "- c #02C805", 15 | "; c #00CC00", 16 | "> c #24B329", 17 | ", c #00D400", 18 | "' c #18CA24", 19 | ") c #3FB740", 20 | "! c #31C733", 21 | "~ c #3FC640", 22 | "{ c #31D633", 23 | "] c #4FC650", 24 | "^ c #5DD45D", 25 | "/ c #5BD957", 26 | "( c #51DF54", 27 | "_ c #6BD16D", 28 | ": c #6AE26D", 29 | "< c #81DF81", 30 | "[ c #8DDB8C", 31 | "} c #7EE77F", 32 | "| c #79EE7A", 33 | "1 c #8FEF8F", 34 | "2 c #9DEC9D", 35 | "3 c #A6E7A5", 36 | " +@$=*&&&*====&&&===$@+ ", 37 | " .#;{:123333333333333[:!&#. ", 38 | " +-;|22222223222223333333<*=+ ", 39 | " .-,11111111221111122223[332!;. ", 40 | " #-}1}|}||1|111111}11<<[[[[[<;# ", 41 | "+*^}}}}|}||}}<<1||||}1<<[[[[[:;+", 42 | "@':^::|||||:___}}|||:|}_<_[_[_'@", 43 | "%{^:://///^_^^_^:/|(/::^______~%", 44 | "*(/////:^^^^_]]^^/((((:^^^]___]=", 45 | "%~~/~(/~]~]]~]]]/((((((//^]]]]^%", 46 | "%~!!!!~)))))~]~]~({({{{(~~~]))]$", 47 | "&!!!!~~))>))~!~!~!{({{(!~~~))))$", 48 | "&!!!*>>>>>>>>!!'{!{{{{{!!~>~)))$", 49 | "=-'*>&>%>&!*'--'{-''{-{'!!!%>#>%", 50 | "*='*>%$%&&'=-{;-'{-='=---=!&!%!%", 51 | "*--=&%%%&=;--;-=-=;=*&!**-=&&&&&", 52 | "=-;-=&%&==;;======--*&&&**&&&&&&", 53 | "*-;-=&**-,;==&&*==-==*&*=-*&&&%&", 54 | "&&=====;;,;=&&&&&*===&===-=*&&$%", 55 | "%&**==,,,,;-&%%%%%&&&**-;;;=&%%%", 56 | "%&&*-;,,,,,;=%%%$$%&%&*-;;;;=&%%", 57 | "&&=-,,,,,,,;=&$$$#%%%%&=-;;;-&&&", 58 | "**=-,,,,,,,=*&%$$$$%%%&=-;;;=*&&", 59 | "*&*=,,,,,,-=&=&&&%%%%&&*=-;;;===", 60 | "$*&*=-{=*===*=-==&&*&&*===;;;;;%", 61 | "@*&*==&%%&&*==--======*&*-;,,,;@", 62 | "+&&&&=&%$%%&=&*===-;;=&*=;,,,,,+", 63 | " #&&&&&%#$%%&%%&*-;;-=*=-,,,,,# ", 64 | " .&===&&$$$%$$%&==,;-=*=,,,,,-. ", 65 | " +&===&%$%%$$$&=;;;-==-,,,,-+ ", 66 | " .#-=&&%%%$$$&=-;=====;,,$. ", 67 | " +@$&&&%$$$%==----='&@+ "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/green_bomb.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * green_bomb_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #003700", 6 | "+ c #003E00", 7 | "@ c #004405", 8 | "# c #004600", 9 | "$ c #005E00", 10 | "% c #1B541B", 11 | "& c #006E00", 12 | "* c #2C602D", 13 | "= c #008B00", 14 | "- c #3E6D3F", 15 | "; c #358335", 16 | "> c #00A800", 17 | ", c #4E7B4E", 18 | "' c #00B700", 19 | ") c #00C100", 20 | "! c #5E895F", 21 | "~ c #00CD00", 22 | "{ c #32B12E", 23 | "] c #40AA3D", 24 | "^ c #00D800", 25 | "/ c #28C42B", 26 | "( c #6D9A6E", 27 | "_ c #41C442", 28 | ": c #5CCB5D", 29 | "< c #58DA59", 30 | "[ c #7EC678", 31 | "} c #73D173", 32 | "| c #73E773", 33 | "1 c #83EB84", 34 | "2 c #93EB92", 35 | "3 c #A0E7A0", 36 | " @&>)'''''))))''')))>&# ", 37 | " .=~~|2333333333333332|/'=. ", 38 | " +~^1222233333323333333332''@ ", 39 | " .)~212122123222222333333333/). ", 40 | " =~12111111121211112222[3[322~= ", 41 | "@)<1|11|||||121111||1112}[[[}|~@", 42 | "=/|||||||||}[!((((([}|}1}}}[}})=", 43 | ">/<:<|<|<|(!!!(!((((((::|}1}}}_>", 44 | ")<<<<<<<:!!!!!!!!!!!!(!}<:<::}:)", 45 | "'_//", 47 | "'/////]-, --------*--;*--]_{_]]>", 48 | "'/////;.---.--***********;_{{{]>", 49 | ")~))>{**.-.*.%%%*%%*%****%//{{>>", 50 | "'))/>>..%.*%%%%%#%%%%%%%%%'/'/>'", 51 | ")~))'{...+++@@##%###@@@@#@)'/'/>", 52 | ")~~~)'.@@@@@@@@@@@#%#@@@@@''>'''", 53 | "))~))'++@@##+++@@#+#@+.+@+'''''>", 54 | ">)))')@####+.++++++++++@@@)''>>>", 55 | "'>')))&###@#+.....+++@+@#&~)'>>>", 56 | ">''))~>#####+........++@#>^~)'>>", 57 | "'')~~^^&####++......+.++&)~~~'''", 58 | "'))~~^^)$###@+.......+++>~~~))''", 59 | "'/')~^^)>#@+++++......#=~)~~~)))", 60 | ">''))))')>$++@@@#++++$>'))~~~~)>", 61 | "='''))''>')=&#+#+@+&>)'')~~^^^^=", 62 | "+'''''>>>>''))')))~)))'''~~^^~~#", 63 | " ='''''>=>>>>>'')~~~~)))~~^~~^= ", 64 | " .>)))''>=>>>>>'')~~~'))~^^^~~. ", 65 | " @))))'>>>>>=>>)~~~))))^^^~~+ ", 66 | " .=~)'>>>>>>>')~~~))))~^^>. ", 67 | " #&>'''>>=>>)~))))))>=@ "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/magenta.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * magenta_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #380F3F", 6 | "+ c #490754", 7 | "@ c #890089", 8 | "# c #9E02A1", 9 | "$ c #A800A6", 10 | "% c #AF00B1", 11 | "& c #B900B6", 12 | "* c #B902BE", 13 | "= c #C200C3", 14 | "- c #CC00C8", 15 | "; c #D100D2", 16 | "> c #DE00DB", 17 | ", c #CC18CC", 18 | "' c #C324C3", 19 | ") c #BC33BC", 20 | "! c #D629D5", 21 | "~ c #B93DB9", 22 | "{ c #D23BD2", 23 | "] c #D34BD2", 24 | "^ c #CF53D0", 25 | "/ c #CE5ECE", 26 | "( c #E551E4", 27 | "_ c #E366E3", 28 | ": c #D473D4", 29 | "< c #DD6DDD", 30 | "[ c #EB7BEC", 31 | "} c #E683E5", 32 | "| c #DD8BDD", 33 | "1 c #F18FF2", 34 | "2 c #F09BF0", 35 | "3 c #E7A2E8", 36 | " +@#=*&%&*====&%&===$@+ ", 37 | " .@=!_233333333333333|/{*@. ", 38 | " +;>[22223333332233333333|'=+ ", 39 | " .=!12111112222122233333333|{-. ", 40 | " @,}}}}1[1[[1}21111}1|||||3||;# ", 41 | "+=_<[[[[[[[[}:}[[[[[}}}|||||:<=+", 42 | "@=<<<_<[__[<<:::[[_[_[<::::|::'@", 43 | "${_/______>;;;=%$$#$$%%%*=;;;-=%%%", 57 | "&&=,-;>>;>;-=%%###$$%%&==--;=&%%", 58 | "&&*;->>>>>;=&%%$#$$$$$%==;,--=&&", 59 | "=*&=;;;;;;-&**&&%$$$$%&&-=;;=&==", 60 | "$*%*===*&===&===***&****==;;;-;$", 61 | "@&&&*=%$%%*&=---==&===*&&=-;>;;@", 62 | "+*&&&&&$#$%&**&=&;=-==**=;;;>;;+", 63 | " @****%$##$%%$&&==;;-=&=-;>;;;@ ", 64 | " .%&==*%$#$$$#$%&=;;-=&=;;>;-;. ", 65 | " +====&$$$$$$$&----=*==;>;>;+ ", 66 | " .#==&%$$%##$%=;;-====;;;#. ", 67 | " +@#%*%$$##%*===-=-&$@+ "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/magenta_bomb.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * magenta_bomb_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #3A033B", 6 | "+ c #410142", 7 | "@ c #48004B", 8 | "# c #6C006C", 9 | "$ c #541954", 10 | "% c #840084", 11 | "& c #9B009D", 12 | "* c #612F61", 13 | "= c #AC00AC", 14 | "- c #792A7D", 15 | "; c #BA00B9", 16 | "> c #C200C2", 17 | ", c #813285", 18 | "' c #D000D0", 19 | ") c #734472", 20 | "! c #B91EBA", 21 | "~ c #8E488B", 22 | "{ c #B034B1", 23 | "] c #855A85", 24 | "^ c #CD31CD", 25 | "/ c #C643C7", 26 | "( c #967098", 27 | "_ c #AC6DAC", 28 | ": c #C960CA", 29 | "< c #D859D8", 30 | "[ c #E770E7", 31 | "} c #E376E3", 32 | "| c #DD7CDD", 33 | "1 c #EF8BEF", 34 | "2 c #E894E8", 35 | "3 c #E7A2E8", 36 | " @%&>;;=;;>>>>;=;>>>=%@ ", 37 | " .&'^[1333333333333332:^;%. ", 38 | " @>'[22233333332333333333|^;@ ", 39 | " .'^121111112221112333333333^'. ", 40 | " &^1111111111222111122222_322'& ", 41 | "@><}}}1[1[[[}}1111[}}}|2|2|_2[>@", 42 | "%>}[}[[[[[[2_((((((2|[}|||||||>%", 43 | "=^<<<<<<[:_]((((((](]_:::::|:|/=", 44 | ";<<<<<<<:]]]]]]]]]]]]]]::::::::>", 45 | ";//<^<^:)))])])])])]]]]]<<:{::<=", 46 | "=/^^^;!={*.*.*.*$*$$$$$*$*$**!!{{{=", 50 | ";'>!=&..*.*.$$$$$$$$$$$$$$!;!!=!", 51 | ">>>>!{.....$.@+@@@$+$+$+$$;!;!!=", 52 | ";''>>=...++@+++++@@++...++;!;;;;", 53 | ";>'';;.++@@+.+..+++++..+++>;;===", 54 | ";;;>>>+++@++..++.+++++++++>;;===", 55 | "==;;;>%+@+@++.......++++@#>>;===", 56 | "=;;>>>=+@+@@+.........++@=''>===", 57 | ";;>>'''#@@+++...........#>'>';==", 58 | ";;>>'''^@@@++..........+=''>>>>;", 59 | ";;;>''''=@++++......+.+&>>''>>;;", 60 | "=;;>>'>;>=#.++++.....#&;>>'''''=", 61 | "%!;;>;;===;%#++++++#&;;;;>'''''%", 62 | "@;;;;;;=&==>;;>;>>>'>>;;>''''''@", 63 | " &=!;;==&&======>>''>>;>>'''''& ", 64 | " .;;;>;==&===&=;;>''';;>'''''>. ", 65 | " @;>>>;=&&==&=;>'>'>>>''''''@ ", 66 | " .&>>==;==&=&=>'>>>>;>'''{. ", 67 | " @%======&&=;>'>'>>>!%@ "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/red.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * red_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #2D0001", 6 | "+ c #440000", 7 | "@ c #850000", 8 | "# c #A20000", 9 | "$ c #AC0001", 10 | "% c #B70000", 11 | "& c #C30000", 12 | "* c #D10000", 13 | "= c #AB1111", 14 | "- c #BF0C10", 15 | "; c #DD0000", 16 | "> c #CD191B", 17 | ", c #BB2222", 18 | "' c #B53A39", 19 | ") c #CF2F30", 20 | "! c #C33738", 21 | "~ c #C34746", 22 | "{ c #E14548", 23 | "] c #D44D4C", 24 | "^ c #CC5554", 25 | "/ c #E25858", 26 | "( c #DB6161", 27 | "_ c #D16867", 28 | ": c #E96A6B", 29 | "< c #E27373", 30 | "[ c #DA7D7E", 31 | "} c #EE8283", 32 | "| c #DD8D8C", 33 | "1 c #EF9191", 34 | "2 c #F09D9B", 35 | "3 c #E9A3A2", 36 | " +@#&%%%%%&&&&%%%&&&#@+ ", 37 | " .#*):1333333333333332(!$#. ", 38 | " +&><22223333332333333333[,%+ ", 39 | " .&)11111111122111233333333|)*. ", 40 | " #>}}1}}}}1}}|111}}}||[||||||># ", 41 | "+%/<<<}}:}<}}[<[}}}}}}[[[|||[(&+", 42 | "@)_<<<:<::<<_<<<<:::<<<[[[[[[[)@", 43 | "#)(((/(:::(_____<:::::(____[__!#", 44 | "%{^](//^^(^^^_^^((///:/(^^_^__^&", 45 | "%~]]]]]~~~^~^~^^~///{/]^^^~^_^^%", 46 | "$!!!!!]'~'~~~~~~~{{{{{{{~]~~'^^#", 47 | "%!){)!''''''!!!!!!!){){!!'~''''#", 48 | "%,),,,!!,',!,)))))))))))!!!''''#", 49 | "&>-,,====,=,,>>>>>>)>>>)),,,@''#", 50 | "%>--=====-->>>>>>>>>>)->>-),,==%", 51 | "&&&-$==#--&**&&&&&&&---%-------$", 52 | "&**&&%$%&&*&&&&-&&>&%%-%&&%$$--%", 53 | "%&*&&%%&&**&&-%%%&*&&%%&%&&%%%$$", 54 | "%%&&&%&&***&%$%%%%&&%%%&&&&%%$$$", 55 | "$%%%&&**;**&%$$$$$%%%%&***&&%$##", 56 | "$%%&&**;****&$$###$%%$%&&***&%%$", 57 | "%%&&**;;;;**%%#####$$%%%**&*&%$%", 58 | "%&&&*;*;*;*&%%$####$#$%%&***&&%%", 59 | "&%%&******&&%%%%$###$%%&&&&*&&&&", 60 | "#&%&&&&&&&&&&&&&&%%%%&%&&&***&&$", 61 | "@%%$&&$$$$%%&&&&&&&&%%&%%****;*@", 62 | "+%%%%&$###$%&%&&&&&**%%&%&*;*;*+", 63 | " @%$&%%###$$$%$%%&**&&&%**;**&# ", 64 | " .&%%&&$#######%&&***%&&**;**&. ", 65 | " +&*&&%$##$##$%&&**&&%&*;*;*+ ", 66 | " .#&&%%%#$###%&&&&&&&&*;*#. ", 67 | " +@#$$%%###$&&*&&&&&#@+ "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/red_bomb.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * red_bomb_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #340001", 6 | "+ c #3C0100", 7 | "@ c #410003", 8 | "# c #440000", 9 | "$ c #760000", 10 | "% c #4E1414", 11 | "& c #A60000", 12 | "* c #B70000", 13 | "= c #5F2928", 14 | "- c #C30000", 15 | "; c #CE0000", 16 | "> c #D90000", 17 | ", c #BE1315", 18 | "' c #653A3B", 19 | ") c #733C3C", 20 | "! c #B92223", 21 | "~ c #D31A1D", 22 | "{ c #744A49", 23 | "] c #AE3232", 24 | "^ c #CD3B3B", 25 | "/ c #875B5B", 26 | "( c #C04848", 27 | "_ c #9A6E6E", 28 | ": c #D35A5A", 29 | "< c #C57170", 30 | "[ c #DF6D6D", 31 | "} c #D97D7D", 32 | "| c #ED8181", 33 | "1 c #DD8D8C", 34 | "2 c #EF9191", 35 | "3 c #EAA2A1", 36 | " #$&-*****----***---&$# ", 37 | " .&;~[2333333333333331[^*&. ", 38 | " @*~|23233333333333333333}!*# ", 39 | " .-~222222222332223333333331^-. ", 40 | " &,|||||||22||222|2|11}111112~& ", 41 | "@-:|||||||[||}}|||||||}}1<11}:-#", 42 | "$~[[[[[[[[[}_______<}|[}}<<}<},$", 43 | "&^:[::[::[>$####@+....+.+.++$;;;-*&*", 58 | "**--;>>;####@@+.+...@..#&;;----*", 59 | "***-;;;>*##+++@@.+++.@@&--;;;-*-", 60 | "&-*-;;-*;*$+#@##+@.@+$&*--;;;;-&", 61 | "$*******&*&&$###@@+$&****-;>>>>$", 62 | "#*****&&&&&&***------*-*-;;>>>;#", 63 | " &*****&&&&*&***---;;-*-;;>;;;& ", 64 | " .*-*-*&&&&&&&&&-;;;--*-;>>>;-. ", 65 | " #*;--*&&&&&&&*--;;---->;>>;# ", 66 | " .&--*&*&&&&&*-;------->>&. ", 67 | " #$&***&&&&&--;-----*$@ "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/sudoku.xbm: -------------------------------------------------------------------------------- 1 | #define sudoku_width 32 2 | #define sudoku_height 32 3 | static unsigned char sudoku_bits[] = { 4 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x0c, 0x30, 0xc0, 5 | 0x63, 0xcc, 0x33, 0xcf, 0x63, 0x4c, 0x33, 0xcc, 0x63, 0x4c, 0x33, 0xcc, 6 | 0x63, 0xcc, 0x33, 0xcc, 0x63, 0x0c, 0x33, 0xcc, 0x63, 0x0c, 0x33, 0xcc, 7 | 0x03, 0x0c, 0x30, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 8 | 0x03, 0x0c, 0x30, 0xc0, 0xd3, 0xcc, 0x33, 0xcf, 0xd3, 0xcc, 0x30, 0xcc, 9 | 0xd3, 0xcc, 0x33, 0xce, 0xf3, 0xcc, 0x32, 0xce, 0xc3, 0xcc, 0x32, 0xcc, 10 | 0xc3, 0xcc, 0x33, 0xcf, 0x03, 0x0c, 0x30, 0xc0, 0xff, 0xff, 0xff, 0xff, 11 | 0xff, 0xff, 0xff, 0xff, 0x03, 0x0c, 0x30, 0xc0, 0xf3, 0xcc, 0x33, 0xcf, 12 | 0x83, 0x4c, 0x33, 0xc1, 0xf3, 0xcc, 0x33, 0xcf, 0x33, 0x4c, 0x33, 0xcc, 13 | 0x33, 0x4c, 0x33, 0xcc, 0xf3, 0xcc, 0x33, 0xcf, 0x03, 0x0c, 0x30, 0xc0, 14 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; 15 | -------------------------------------------------------------------------------- /examples/pixmaps/white_1.xbm: -------------------------------------------------------------------------------- 1 | #define white_1_width 56 2 | #define white_1_height 56 3 | static unsigned char white_1_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 11 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 12 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 13 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 14 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 15 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 16 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 17 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 18 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 19 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 22 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 24 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 25 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 28 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 29 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 30 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 31 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 32 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 33 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x05, 36 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x05, 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x02, 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x01, 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x02, 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x01, 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x01, 44 | 0x80, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x00, 45 | 0x00, 0x01, 0x00, 0x00, 0x40, 0x55, 0x00, 46 | 0x00, 0x02, 0x00, 0x00, 0xa8, 0x2a, 0x00, 47 | 0x00, 0x14, 0x00, 0x00, 0x54, 0x15, 0x00, 48 | 0x00, 0x28, 0x00, 0x80, 0xaa, 0x0a, 0x00, 49 | 0x00, 0x50, 0x05, 0x54, 0x55, 0x05, 0x00, 50 | 0x00, 0xa0, 0xaa, 0xaa, 0xaa, 0x02, 0x00, 51 | 0x00, 0x40, 0x55, 0x55, 0x55, 0x01, 0x00, 52 | 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 53 | 0x00, 0x00, 0x50, 0x55, 0x15, 0x00, 0x00, 54 | 0x00, 0x00, 0x80, 0xaa, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/white_2.xbm: -------------------------------------------------------------------------------- 1 | #define white_2_width 56 2 | #define white_2_height 56 3 | static unsigned char white_2_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 7 | 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 9 | 0x00, 0x00, 0x04, 0x90, 0x04, 0x00, 0x00, 10 | 0x00, 0x20, 0x01, 0x40, 0x12, 0x00, 0x00, 11 | 0x00, 0x48, 0xfc, 0x0f, 0x09, 0x00, 0x00, 12 | 0x00, 0x10, 0x07, 0x30, 0x04, 0x00, 0x00, 13 | 0x40, 0xc2, 0x00, 0xc0, 0x10, 0x00, 0x00, 14 | 0x80, 0x24, 0x00, 0x00, 0x09, 0x00, 0x00, 15 | 0x20, 0x11, 0x00, 0x00, 0x42, 0x00, 0x00, 16 | 0x40, 0x08, 0x00, 0x00, 0x20, 0x00, 0x00, 17 | 0x90, 0x04, 0x00, 0x00, 0x80, 0x00, 0x00, 18 | 0x20, 0x02, 0x00, 0x00, 0x40, 0x04, 0x00, 19 | 0x48, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 20 | 0x10, 0x01, 0x00, 0x00, 0x80, 0x08, 0x00, 21 | 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 22 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 23 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 24 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 25 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 26 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 27 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 28 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 29 | 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 30 | 0x84, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 31 | 0xa0, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 32 | 0x00, 0x01, 0x00, 0x54, 0x01, 0x01, 0x00, 33 | 0x44, 0x01, 0x00, 0xaa, 0x00, 0x02, 0x00, 34 | 0x00, 0x02, 0x40, 0x55, 0x80, 0x04, 0x00, 35 | 0x88, 0x02, 0xa0, 0x0a, 0x00, 0x01, 0x00, 36 | 0x40, 0x04, 0x50, 0x05, 0x40, 0x02, 0x00, 37 | 0x00, 0x09, 0xa0, 0x00, 0x80, 0x00, 0x00, 38 | 0x80, 0x00, 0x50, 0x00, 0x20, 0x01, 0x00, 39 | 0x00, 0x04, 0x08, 0x00, 0x48, 0x00, 0x00, 40 | 0x00, 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 41 | 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 42 | 0x00, 0x24, 0x00, 0x80, 0x04, 0x00, 0x00, 43 | 0x00, 0x92, 0x00, 0x20, 0x01, 0x00, 0x00, 44 | 0x00, 0x48, 0x02, 0x08, 0x00, 0x00, 0x00, 45 | 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/white_3.xbm: -------------------------------------------------------------------------------- 1 | #define white_3_width 56 2 | #define white_3_height 56 3 | static unsigned char white_3_bits[] = { 4 | 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 5 | 0x00, 0x40, 0x40, 0x81, 0x00, 0x00, 0x00, 6 | 0x00, 0x18, 0x40, 0x09, 0x00, 0x00, 0x00, 7 | 0x00, 0x06, 0x52, 0x09, 0x00, 0x00, 0x00, 8 | 0x00, 0x91, 0x52, 0x05, 0x00, 0x00, 0x00, 9 | 0x80, 0x94, 0x50, 0x05, 0x00, 0x00, 0x00, 10 | 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x10, 0x01, 0x50, 0x05, 0x60, 0x00, 0x00, 13 | 0x08, 0x00, 0xaa, 0x2a, 0x00, 0x00, 0x00, 14 | 0x08, 0x40, 0x55, 0x55, 0x80, 0x01, 0x00, 15 | 0x04, 0xa0, 0xaa, 0xa0, 0x00, 0x00, 0x00, 16 | 0x04, 0x50, 0x55, 0x55, 0x05, 0x03, 0x00, 17 | 0x02, 0xa8, 0x0a, 0xa0, 0x0a, 0x00, 0x00, 18 | 0x02, 0x54, 0x55, 0x55, 0x15, 0x00, 0x00, 19 | 0x00, 0xa8, 0x00, 0x80, 0x1a, 0x03, 0x00, 20 | 0x00, 0x54, 0x55, 0x55, 0x35, 0x00, 0x00, 21 | 0x00, 0x0a, 0x00, 0x80, 0x2a, 0x06, 0x00, 22 | 0x0d, 0x45, 0x55, 0x55, 0x55, 0x00, 0x00, 23 | 0x31, 0x0a, 0x00, 0x00, 0x6a, 0x00, 0x00, 24 | 0x00, 0x05, 0x55, 0x55, 0x55, 0x07, 0x00, 25 | 0x3e, 0x02, 0x00, 0x00, 0x6a, 0x00, 0x00, 26 | 0x00, 0x05, 0x55, 0x55, 0x55, 0x1f, 0x00, 27 | 0x3e, 0x0a, 0x00, 0x00, 0x68, 0x00, 0x00, 28 | 0x00, 0x15, 0x54, 0x55, 0x55, 0x1f, 0x00, 29 | 0x38, 0x0a, 0x00, 0x00, 0x69, 0x00, 0x00, 30 | 0x01, 0x15, 0x54, 0x95, 0x56, 0x03, 0x00, 31 | 0x01, 0x2a, 0x00, 0x50, 0x69, 0x0c, 0x00, 32 | 0x18, 0x54, 0x50, 0xa9, 0x34, 0x00, 0x00, 33 | 0x00, 0x2a, 0x00, 0x55, 0x2b, 0x00, 0x00, 34 | 0x30, 0x54, 0x90, 0x2a, 0x15, 0x00, 0x00, 35 | 0x02, 0xa8, 0x40, 0xb5, 0x1a, 0x00, 0x00, 36 | 0x00, 0x50, 0xa1, 0x52, 0x0d, 0x00, 0x00, 37 | 0x30, 0xa0, 0x50, 0xab, 0x06, 0x00, 0x00, 38 | 0x00, 0x50, 0x29, 0x55, 0x03, 0x00, 0x00, 39 | 0x60, 0xa0, 0xb2, 0xaa, 0x01, 0x00, 0x00, 40 | 0x00, 0xc0, 0x55, 0xd5, 0x00, 0x00, 0x00, 41 | 0x80, 0x01, 0xab, 0x3a, 0x20, 0x00, 0x00, 42 | 0x00, 0x00, 0xfc, 0x0f, 0x20, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 44 | 0x00, 0x00, 0xa8, 0x42, 0x0a, 0x00, 0x00, 45 | 0x00, 0x00, 0xa8, 0x52, 0x02, 0x00, 0x00, 46 | 0x00, 0x00, 0xa4, 0x12, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/white_4.xbm: -------------------------------------------------------------------------------- 1 | #define white_4_width 56 2 | #define white_4_height 56 3 | static unsigned char white_4_bits[] = { 4 | 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 5 | 0x00, 0x80, 0xbf, 0x7e, 0x00, 0x00, 0x00, 6 | 0x00, 0xe0, 0xb6, 0xf6, 0x01, 0x00, 0x00, 7 | 0x00, 0xb8, 0xad, 0xb6, 0x07, 0x00, 0x00, 8 | 0x00, 0x6e, 0xad, 0xda, 0x1e, 0x00, 0x00, 9 | 0x00, 0x6b, 0xab, 0x6a, 0x3b, 0x00, 0x00, 10 | 0x80, 0xdb, 0xfe, 0xbf, 0x6d, 0x00, 0x00, 11 | 0xc0, 0xb6, 0x03, 0xf0, 0xf6, 0x00, 0x00, 12 | 0xe0, 0xee, 0xa8, 0xca, 0x9b, 0x01, 0x00, 13 | 0xb0, 0x3d, 0x55, 0x15, 0xef, 0x03, 0x00, 14 | 0x70, 0x9b, 0xaa, 0xaa, 0x76, 0x02, 0x00, 15 | 0xd8, 0x4e, 0x55, 0x5f, 0xbd, 0x07, 0x00, 16 | 0xb8, 0xa7, 0xaa, 0xaa, 0xda, 0x04, 0x00, 17 | 0x6c, 0x53, 0xf5, 0x5f, 0x75, 0x0f, 0x00, 18 | 0xdc, 0xa9, 0xaa, 0xaa, 0xaa, 0x0b, 0x00, 19 | 0xb6, 0x55, 0xff, 0x7f, 0xe5, 0x1c, 0x00, 20 | 0xee, 0xaa, 0xaa, 0xaa, 0x4a, 0x17, 0x00, 21 | 0xde, 0xf4, 0xff, 0x7f, 0xd5, 0x19, 0x00, 22 | 0x72, 0xba, 0xaa, 0xaa, 0xaa, 0x1e, 0x00, 23 | 0x4e, 0xf5, 0xff, 0xff, 0x95, 0x17, 0x00, 24 | 0x7f, 0xfa, 0xaa, 0xaa, 0xaa, 0x38, 0x00, 25 | 0x41, 0xfd, 0xff, 0xff, 0x95, 0x3f, 0x00, 26 | 0x7f, 0xfa, 0xaa, 0xaa, 0xaa, 0x20, 0x00, 27 | 0x41, 0xf5, 0xff, 0xff, 0x97, 0x3f, 0x00, 28 | 0x7f, 0xea, 0xab, 0xaa, 0xaa, 0x20, 0x00, 29 | 0x47, 0xf5, 0xff, 0xff, 0x94, 0x3f, 0x00, 30 | 0x7a, 0xea, 0xab, 0x2a, 0xa8, 0x1c, 0x00, 31 | 0x5e, 0xd5, 0xff, 0x0f, 0x94, 0x13, 0x00, 32 | 0xe6, 0xaa, 0xaf, 0x02, 0xca, 0x1e, 0x00, 33 | 0xba, 0xd4, 0xff, 0x00, 0xd4, 0x1d, 0x00, 34 | 0xce, 0xa9, 0x2f, 0x80, 0x6a, 0x1b, 0x00, 35 | 0x74, 0x55, 0x1f, 0x40, 0xe5, 0x0e, 0x00, 36 | 0xbc, 0xab, 0x0e, 0xa8, 0xb2, 0x0d, 0x00, 37 | 0xc8, 0x56, 0x0f, 0x54, 0x79, 0x07, 0x00, 38 | 0x78, 0xaf, 0x86, 0xaa, 0xdc, 0x06, 0x00, 39 | 0x90, 0x5b, 0x45, 0x55, 0xb6, 0x03, 0x00, 40 | 0xf0, 0x3d, 0xaa, 0x2a, 0x6f, 0x03, 0x00, 41 | 0x60, 0xf6, 0x54, 0xc5, 0xdd, 0x01, 0x00, 42 | 0xc0, 0xdb, 0x03, 0x70, 0xdb, 0x00, 0x00, 43 | 0x80, 0x6d, 0xff, 0xdf, 0x76, 0x00, 0x00, 44 | 0x00, 0xb7, 0x55, 0xb5, 0x35, 0x00, 0x00, 45 | 0x00, 0xde, 0x56, 0xad, 0x1d, 0x00, 0x00, 46 | 0x00, 0x78, 0x5b, 0x6d, 0x07, 0x00, 0x00, 47 | 0x00, 0xe0, 0x5b, 0xdb, 0x01, 0x00, 0x00, 48 | 0x00, 0x80, 0x5f, 0x7f, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/whiteking_1.xbm: -------------------------------------------------------------------------------- 1 | #define whiteking_1_width 56 2 | #define whiteking_1_height 56 3 | static unsigned char whiteking_1_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 7 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 9 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 10 | 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 11 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 12 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 13 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 14 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 15 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 16 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 17 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 18 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 19 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 20 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 21 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 22 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x0a, 23 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 24 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 25 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 26 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2a, 27 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 28 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2a, 29 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 30 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x2a, 31 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 32 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 33 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 34 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 35 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 36 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 37 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 38 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 39 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 40 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 41 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 42 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 44 | 0x80, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x2a, 45 | 0x00, 0x01, 0x00, 0x00, 0x40, 0x55, 0x55, 46 | 0x00, 0x02, 0x00, 0x00, 0xa8, 0xaa, 0x2a, 47 | 0x00, 0x14, 0x00, 0x00, 0x54, 0x55, 0x15, 48 | 0x00, 0x28, 0x00, 0x80, 0xaa, 0xaa, 0x2a, 49 | 0x00, 0x50, 0x05, 0x54, 0x55, 0x55, 0x15, 50 | 0x00, 0xa0, 0xaa, 0xaa, 0xaa, 0xaa, 0x0a, 51 | 0x00, 0x40, 0x55, 0x55, 0x55, 0x55, 0x05, 52 | 0x00, 0x80, 0xaa, 0xaa, 0xaa, 0xaa, 0x02, 53 | 0x00, 0x00, 0x55, 0x55, 0x55, 0x55, 0x01, 54 | 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 55 | 0x00, 0x00, 0x54, 0x55, 0x55, 0x55, 0x00, 56 | 0x00, 0x00, 0xa8, 0xaa, 0xaa, 0x2a, 0x00, 57 | 0x00, 0x00, 0x40, 0x55, 0x55, 0x15, 0x00, 58 | 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x02, 0x00, 59 | 0x00, 0x00, 0x00, 0x50, 0x15, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/whiteking_2.xbm: -------------------------------------------------------------------------------- 1 | #define whiteking_2_width 56 2 | #define whiteking_2_height 56 3 | static unsigned char whiteking_2_bits[] = { 4 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 5 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 7 | 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, 8 | 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 9 | 0x00, 0x00, 0x04, 0x90, 0x04, 0x00, 0x00, 10 | 0x00, 0x20, 0x01, 0x40, 0x12, 0x00, 0x00, 11 | 0x00, 0x48, 0xfc, 0x0f, 0x09, 0x00, 0x00, 12 | 0x00, 0x10, 0x07, 0x30, 0x04, 0x00, 0x00, 13 | 0x40, 0xc2, 0x00, 0xc0, 0x10, 0x00, 0x00, 14 | 0x80, 0x24, 0x00, 0x00, 0x09, 0x00, 0x00, 15 | 0x20, 0x11, 0x00, 0x00, 0x42, 0x00, 0x00, 16 | 0x40, 0x08, 0x80, 0x00, 0x20, 0x00, 0x00, 17 | 0x90, 0x04, 0xc4, 0x10, 0x80, 0x00, 0x00, 18 | 0x20, 0x02, 0x06, 0x18, 0x40, 0x04, 0x00, 19 | 0x48, 0x42, 0x00, 0x00, 0x01, 0x00, 0x00, 20 | 0x10, 0x61, 0x00, 0x88, 0x81, 0x08, 0x00, 21 | 0x20, 0x01, 0x10, 0x10, 0x00, 0x00, 0x00, 22 | 0x80, 0x00, 0x20, 0x08, 0x00, 0x01, 0x00, 23 | 0x80, 0x40, 0x40, 0x10, 0x04, 0x08, 0x00, 24 | 0x80, 0x80, 0x00, 0x20, 0x02, 0x00, 0x00, 25 | 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 26 | 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 27 | 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 28 | 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 29 | 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 30 | 0x84, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 31 | 0xa0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 32 | 0x00, 0x01, 0x00, 0x80, 0x00, 0x01, 0x00, 33 | 0x44, 0x01, 0x00, 0x40, 0x01, 0x02, 0x00, 34 | 0x00, 0x02, 0xaa, 0xaa, 0x80, 0x04, 0x00, 35 | 0x88, 0x02, 0x54, 0x55, 0x00, 0x01, 0x00, 36 | 0x40, 0x04, 0xaa, 0x2a, 0x40, 0x02, 0x00, 37 | 0x00, 0x09, 0x54, 0x15, 0x80, 0x00, 0x00, 38 | 0x80, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 39 | 0x00, 0x04, 0x00, 0x00, 0x48, 0x00, 0x00, 40 | 0x00, 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 41 | 0x00, 0x08, 0x00, 0x00, 0x02, 0x00, 0x00, 42 | 0x00, 0x24, 0x00, 0x80, 0x04, 0x00, 0x00, 43 | 0x00, 0x92, 0x00, 0x20, 0x01, 0x00, 0x00, 44 | 0x00, 0x48, 0x02, 0x08, 0x00, 0x00, 0x00, 45 | 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 46 | 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/whiteking_3.xbm: -------------------------------------------------------------------------------- 1 | #define whiteking_3_width 56 2 | #define whiteking_3_height 56 3 | static unsigned char whiteking_3_bits[] = { 4 | 0x00, 0x00, 0x0c, 0x0c, 0x00, 0x00, 0x00, 5 | 0x00, 0x40, 0x40, 0x81, 0x00, 0x00, 0x00, 6 | 0x00, 0x18, 0x40, 0x09, 0x00, 0x00, 0x00, 7 | 0x00, 0x06, 0x52, 0x09, 0x00, 0x00, 0x00, 8 | 0x00, 0x91, 0x52, 0x05, 0x00, 0x00, 0x00, 9 | 0x80, 0x94, 0x50, 0x05, 0x00, 0x00, 0x00, 10 | 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 11 | 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 12 | 0x10, 0x01, 0x50, 0x05, 0x60, 0x00, 0x00, 13 | 0x08, 0x00, 0xaa, 0x2a, 0x00, 0x00, 0x00, 14 | 0x08, 0x40, 0x55, 0x55, 0x80, 0x01, 0x00, 15 | 0x04, 0xa0, 0x0a, 0xaa, 0x00, 0x00, 0x00, 16 | 0x04, 0x50, 0x10, 0x41, 0x05, 0x03, 0x00, 17 | 0x02, 0xa8, 0x08, 0xa2, 0x0a, 0x00, 0x00, 18 | 0x02, 0x04, 0x50, 0x01, 0x14, 0x00, 0x00, 19 | 0x00, 0x88, 0xaa, 0x2a, 0x1a, 0x03, 0x00, 20 | 0x00, 0x04, 0x59, 0x11, 0x34, 0x00, 0x00, 21 | 0x01, 0xaa, 0xa8, 0xa8, 0x2a, 0x06, 0x00, 22 | 0x0d, 0x55, 0x51, 0x54, 0x55, 0x00, 0x00, 23 | 0x31, 0xa2, 0x28, 0x2a, 0x6a, 0x00, 0x00, 24 | 0x00, 0x45, 0x54, 0x15, 0x55, 0x07, 0x00, 25 | 0x3e, 0xa2, 0xa8, 0xaa, 0x6b, 0x00, 0x00, 26 | 0x00, 0x45, 0x55, 0x55, 0x55, 0x1f, 0x00, 27 | 0x3e, 0x8a, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 28 | 0x00, 0x45, 0x55, 0xd5, 0x55, 0x1f, 0x00, 29 | 0x38, 0x8a, 0xaa, 0xaa, 0x6a, 0x00, 0x00, 30 | 0x01, 0x15, 0x55, 0x55, 0x55, 0x03, 0x00, 31 | 0x01, 0x2a, 0xaa, 0xea, 0x6a, 0x0c, 0x00, 32 | 0x19, 0x14, 0x54, 0x55, 0x35, 0x00, 0x00, 33 | 0x00, 0x2a, 0xaa, 0xaa, 0x2a, 0x00, 0x00, 34 | 0x30, 0x54, 0x54, 0x55, 0x15, 0x00, 0x00, 35 | 0x02, 0xa8, 0xaa, 0xaa, 0x1a, 0x00, 0x00, 36 | 0x00, 0x50, 0x55, 0xd5, 0x0d, 0x00, 0x00, 37 | 0x30, 0xa0, 0xaa, 0xea, 0x06, 0x00, 0x00, 38 | 0x00, 0x50, 0x55, 0x55, 0x03, 0x00, 0x00, 39 | 0x60, 0xa0, 0xaa, 0xaa, 0x01, 0x00, 0x00, 40 | 0x00, 0xc0, 0x55, 0xd5, 0x00, 0x00, 0x00, 41 | 0x80, 0x01, 0xab, 0x3a, 0x20, 0x00, 0x00, 42 | 0x00, 0x00, 0xfc, 0x0f, 0x20, 0x00, 0x00, 43 | 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 44 | 0x00, 0x00, 0xa8, 0x42, 0x0a, 0x00, 0x00, 45 | 0x00, 0x00, 0xa8, 0x52, 0x02, 0x00, 0x00, 46 | 0x00, 0x00, 0xa4, 0x12, 0x00, 0x00, 0x00, 47 | 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x00, 48 | 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/whiteking_4.xbm: -------------------------------------------------------------------------------- 1 | #define whiteking_4_width 56 2 | #define whiteking_4_height 56 3 | static unsigned char whiteking_4_bits[] = { 4 | 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 5 | 0x00, 0x80, 0xbf, 0x7e, 0x00, 0x00, 0x00, 6 | 0x00, 0xe0, 0xb6, 0xf6, 0x01, 0x00, 0x00, 7 | 0x00, 0xb8, 0xad, 0xb6, 0x07, 0x00, 0x00, 8 | 0x00, 0x6e, 0xad, 0xda, 0x1e, 0x00, 0x00, 9 | 0x00, 0x6b, 0xab, 0x6a, 0x3b, 0x00, 0x00, 10 | 0x80, 0xdb, 0xfe, 0xbf, 0x6d, 0x00, 0x00, 11 | 0xc0, 0xb6, 0x03, 0xf0, 0xf6, 0x00, 0x00, 12 | 0xe0, 0xee, 0xa8, 0xca, 0x9b, 0x01, 0x00, 13 | 0xb0, 0x3d, 0x55, 0x15, 0xef, 0x03, 0x00, 14 | 0x70, 0x9b, 0xaa, 0xaa, 0x76, 0x02, 0x00, 15 | 0xd8, 0x4e, 0xf5, 0x55, 0xbd, 0x07, 0x00, 16 | 0xb8, 0xa7, 0x6f, 0xbe, 0xda, 0x04, 0x00, 17 | 0x6c, 0x53, 0x33, 0x4d, 0x75, 0x0f, 0x00, 18 | 0xdc, 0xf9, 0xa9, 0xe6, 0xab, 0x0b, 0x00, 19 | 0xb6, 0x35, 0x55, 0xd5, 0xe4, 0x1c, 0x00, 20 | 0xee, 0x9a, 0xa6, 0x66, 0x4a, 0x17, 0x00, 21 | 0xde, 0x54, 0x47, 0x47, 0xd5, 0x19, 0x00, 22 | 0x72, 0xaa, 0x8e, 0xa3, 0xaa, 0x1e, 0x00, 23 | 0x4e, 0x1d, 0x97, 0xc5, 0x91, 0x17, 0x00, 24 | 0x7f, 0x3a, 0xab, 0xca, 0xa8, 0x38, 0x00, 25 | 0x41, 0x5d, 0x57, 0x55, 0x90, 0x3f, 0x00, 26 | 0x7f, 0xba, 0xaa, 0xaa, 0xa8, 0x20, 0x00, 27 | 0x41, 0x75, 0x55, 0x55, 0x94, 0x3f, 0x00, 28 | 0x7f, 0xba, 0xaa, 0x2a, 0xa8, 0x20, 0x00, 29 | 0x47, 0x75, 0x55, 0x55, 0x94, 0x3f, 0x00, 30 | 0x7a, 0xea, 0xaa, 0x2a, 0xaa, 0x1c, 0x00, 31 | 0x5e, 0xd5, 0x55, 0x15, 0x94, 0x13, 0x00, 32 | 0xe6, 0xea, 0xab, 0x2a, 0xca, 0x1e, 0x00, 33 | 0xba, 0xd4, 0x55, 0x15, 0xd4, 0x1d, 0x00, 34 | 0xce, 0xa9, 0x01, 0x00, 0x6a, 0x1b, 0x00, 35 | 0x74, 0x55, 0x01, 0x00, 0xe5, 0x0e, 0x00, 36 | 0xbc, 0xab, 0x00, 0x00, 0xb2, 0x0d, 0x00, 37 | 0xc8, 0x56, 0x01, 0x00, 0x79, 0x07, 0x00, 38 | 0x78, 0xaf, 0xaa, 0xaa, 0xdc, 0x06, 0x00, 39 | 0x90, 0x5b, 0x55, 0x55, 0xb6, 0x03, 0x00, 40 | 0xf0, 0x3d, 0xaa, 0x2a, 0x6f, 0x03, 0x00, 41 | 0x60, 0xf6, 0x54, 0xc5, 0xdd, 0x01, 0x00, 42 | 0xc0, 0xdb, 0x03, 0x70, 0xdb, 0x00, 0x00, 43 | 0x80, 0x6d, 0xff, 0xdf, 0x76, 0x00, 0x00, 44 | 0x00, 0xb7, 0x55, 0xb5, 0x35, 0x00, 0x00, 45 | 0x00, 0xde, 0x56, 0xad, 0x1d, 0x00, 0x00, 46 | 0x00, 0x78, 0x5b, 0x6d, 0x07, 0x00, 0x00, 47 | 0x00, 0xe0, 0x5b, 0xdb, 0x01, 0x00, 0x00, 48 | 0x00, 0x80, 0x5f, 0x7f, 0x00, 0x00, 0x00, 49 | 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x00, 50 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 51 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 52 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 53 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 54 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 55 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 56 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 57 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 58 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 59 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 60 | }; 61 | -------------------------------------------------------------------------------- /examples/pixmaps/yellow.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * yellow_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #2A4602", 6 | "+ c #435B00", 7 | "@ c #818600", 8 | "# c #969900", 9 | "$ c #A3A400", 10 | "% c #B0AF00", 11 | "& c #B4B425", 12 | "* c #BAB800", 13 | "= c #BABE02", 14 | "- c #B4B73F", 15 | "; c #C0C300", 16 | "> c #C7C905", 17 | ", c #C6C821", 18 | "' c #CBCC00", 19 | ") c #CAC835", 20 | "! c #C9C943", 21 | "~ c #D1D201", 22 | "{ c #C7C94E", 23 | "] c #CACB5D", 24 | "^ c #D8D700", 25 | "/ c #D9DB3C", 26 | "( c #D5D67B", 27 | "_ c #DADB6D", 28 | ": c #DFDE57", 29 | "< c #DFDF64", 30 | "[ c #D9DB8A", 31 | "} c #EAEB76", 32 | "| c #E7E7A1", 33 | "1 c #EBEC82", 34 | "2 c #EEED91", 35 | "3 c #EEEF9C", 36 | " +@$;**%**==;=*%*=;;$@+ ", 37 | " .#'/<2||||||||||||||[_)*#. ", 38 | " +>^}32233||3|333||||||||(*=+ ", 39 | " .>'2222222233322223||||||||,'. ", 40 | " #,1111111112222212122[[[[[[[^# ", 41 | "+*:_111}}}}1_1(111}1111([[[[[_'+", 42 | "@,___}}}}}}_____1}}}}}_(((((((,@", 43 | "$/<<:<<<<<__](]]<}:}<}__](](](!$", 44 | "*:!>'''/,/'),,'>>,)*&&&%", 51 | "*>';*&$&*;''',>;;>>'****,*****%%", 52 | "*'~'**%%;>~'>,;***''****;;******", 53 | "*>'>;***>'^****;'*>>;***;,**%*%%", 54 | "%*;*;*''^'~>*%%*****,*;*'>,*%%$%", 55 | "%****''^~^~;*%%%%%*****''''>=%%$", 56 | "%**>;'^^^^^'*%$$$$%%%**>''''*%%%", 57 | "%**>^^^^^^~^*%%$#$$%%%**>'~''=%%", 58 | "*;*>'^^^^^~;*%%$$$#$$%**'>~';==*", 59 | ";***'^~'^~;;****%%%%%****>'';;*=", 60 | "%**;;>;**;;*;;;***%***;*;;'^~~>%", 61 | "@***,**%%****>''>;*;*;***>^~^~~@", 62 | "+*****%$#%%*****;>>'';***'^~^^~+", 63 | " #*****$$#%%%%****'''>*;'^~~~~# ", 64 | " .%;*,;%$$$$$$%**~^'>**>~^^^~>. ", 65 | " +*>'*%%$%%$$$**>'^';;*~^^~>+ ", 66 | " .#';*%$$%$$$*;';>>*>;~~^$. ", 67 | " +@#%**%$$$%>*>>>'*>$@+ "}; 68 | -------------------------------------------------------------------------------- /examples/pixmaps/yellow_bomb.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static const char * yellow_bomb_xpm[] = { 3 | "32 32 32 1", 4 | " c #000100", 5 | ". c #393900", 6 | "+ c #2A4602", 7 | "@ c #434101", 8 | "# c #474900", 9 | "$ c #435B00", 10 | "% c #515116", 11 | "& c #5B5C20", 12 | "* c #676800", 13 | "= c #666635", 14 | "- c #7C7B50", 15 | "; c #848323", 16 | "> c #838442", 17 | ", c #8E9200", 18 | "' c #8A8A5F", 19 | ") c #A6A600", 20 | "! c #9A9B6D", 21 | "~ c #B2B102", 22 | "{ c #AFB132", 23 | "] c #BAB900", 24 | "^ c #C1C300", 25 | "/ c #C6C42C", 26 | "( c #CFD000", 27 | "_ c #C7C84F", 28 | ": c #CBCA40", 29 | "< c #CCCC67", 30 | "[ c #D7D984", 31 | "} c #E0E167", 32 | "| c #E0E07A", 33 | "1 c #E6E6A0", 34 | "2 c #EEEE88", 35 | "3 c #EDED97", 36 | " $,)]]]~]]]]^]]~]]^^),$ ", 37 | " +,(/}2111111111111113'>--_}_____]", 46 | "~::/:/_>=-=--=--=--=---->____<<)", 47 | "~:///:;=============>===={:{{{{)", 48 | "]^///:>%=.=.========&====>{:{{{,", 49 | "^^^]~{.=.==.=%%%&&&&&=&&&%/~{{{~", 50 | "]^^/))....=.%%=%%%%&%%%%%%/~~~~~", 51 | "^^^^/{.=...%@@@@%#%@%@%%%%]/~/~~", 52 | "^((^]~...%%@@@@.@@@@@@.@@@]]]~]]", 53 | "]^((]/..@@@%..@@@@@@@.@.@@]~~]~~", 54 | "~]]^]]@%@#@@...@@@@@@.@@@@^]~))~", 55 | ")~]]^^;@##@#@........@@@#;^^]~))", 56 | "~~]]^()#@##@@......@..@@@)((^]~)", 57 | "~]^^(((*####@..........@*(((^~~]", 58 | "]]^^(((^##@@@..........@)^^(^]]]", 59 | "/]]((((()##@..........@)(((((^]]", 60 | ")]~]((^^])*@@@@.....@*,]]^^((((~", 61 | ",]]]]]]~~~~,*@@#@@@*,]]]^^((((^,", 62 | "$~~]/]~)))~]]]]]^^(((^]]^(((((($", 63 | " ,]~]~~),))~~~~]]^((^^]]((((((, ", 64 | " +]]^^^])))))))~^^(((]]^((((((+ ", 65 | " $^^^]~)))))))]^(((^^](((((($ ", 66 | " +,(^]~)~))))~]^^^^^/^((({+ ", 67 | " $,,~]~)),)~^^(^(^^^/,$ "}; 68 | -------------------------------------------------------------------------------- /examples/progress-simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #ifdef WIN32 8 | // WINDOWS 9 | #include 10 | #define usleep(v) Sleep(v/1000) 11 | #else /*WIN32*/ 12 | // UNIX 13 | #include // usleep 14 | #endif /*WIN32*/ 15 | 16 | void butt_cb(fl_Widget b, void* data){ 17 | fl_Button butt = (fl_Button)b; 18 | Fl_Button_deactivate(butt); 19 | Fl_check(); 20 | fl_Window w = (fl_Window)data; 21 | Fl_Window_begin(w); 22 | fl_Progress progress = Fl_Progress_New(10,50,200,30); 23 | Fl_Progress_set_minimum(progress,0); 24 | Fl_Progress_set_maximum(progress,1); 25 | Fl_Progress_set_color(progress,0x88888800); 26 | Fl_Progress_set_selection_color(progress,0x4444ff00); 27 | Fl_Progress_set_labelcolor(progress,FL_WHITE); 28 | Fl_Window_end(w); 29 | int t = 1; 30 | for (;t <= 500; t++){ 31 | Fl_Progress_set_value(progress,t/500.0); 32 | char percent[10]; 33 | sprintf(percent, "%d%%", (int)((t/500.0)*100.0)); 34 | Fl_Progress_set_label(progress,percent); 35 | Fl_check(); 36 | usleep(1000); 37 | } 38 | Fl_Window_remove_widget(w,progress); 39 | Fl_Progress_Destroy(progress); 40 | Fl_Button_activate(butt); 41 | Fl_Window_redraw(w); 42 | } 43 | int main(int argc, char** argv){ 44 | fl_Window win = (fl_Window)Fl_Window_New(220,90); 45 | fl_Button butt = (fl_Button)Fl_Button_New_WithLabel(10,10,100,25,"Press"); 46 | Fl_Button_set_callback_with_user_data(butt,butt_cb, (void*)win); 47 | Fl_Window_resizable(win); 48 | Fl_Window_show(win); 49 | return(Fl_run()); 50 | } 51 | -------------------------------------------------------------------------------- /examples/table-simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_EnumerationsC.h" 4 | #include "Fl_Types.h" 5 | #include "Fl_Double_WindowC.h" 6 | #include "Fl_DrawC.h" 7 | #include "Fl_TableC.h" 8 | 9 | #define MAX_ROWS 30 10 | #define MAX_COLS 26 // A-Z 11 | int data[MAX_ROWS][MAX_COLS]; // data array for cells 12 | 13 | void DrawHeader(fl_Table table,const char *s, int X, int Y, int W, int H){ 14 | flc_push_clip(X,Y,W,H); 15 | flc_draw_box(FL_THIN_UP_BOX, X,Y,W,H, Fl_Table_row_header_color(table)); 16 | flc_set_color(FL_BLACK); 17 | flc_draw_with_align(s, X,Y,W,H, FL_ALIGN_CENTER); 18 | flc_pop_clip(); 19 | } 20 | void DrawData(fl_Table table,const char *s, int X, int Y, int W, int H){ 21 | flc_push_clip(X,Y,W,H); 22 | flc_set_color(FL_WHITE); flc_rectf(X,Y,W,H); 23 | flc_set_color(FL_GRAY0); flc_draw_with_align(s, X,Y,W,H, FL_ALIGN_CENTER); 24 | flc_set_color(Fl_Table_color(table)); flc_rect(X,Y,W,H); 25 | flc_pop_clip(); 26 | } 27 | void draw_cell(fl_Table table,TableContextC context, int ROW, int COL, int X, int Y, int W, int H){ 28 | static char s[40]; 29 | switch ( context ) { 30 | case CONTEXT_STARTPAGEC: 31 | flc_set_font(FL_HELVETICA, 16); 32 | return; 33 | case CONTEXT_COL_HEADERC: 34 | sprintf(s,"%c",'A'+COL); 35 | DrawHeader(table,s,X,Y,W,H); 36 | return; 37 | case CONTEXT_ROW_HEADERC: 38 | sprintf(s,"%03d:",ROW); 39 | DrawHeader(table,s,X,Y,W,H); 40 | return; 41 | case CONTEXT_CELLC: 42 | sprintf(s,"%d",data[ROW][COL]); 43 | DrawData(table,s,X,Y,W,H); 44 | return; 45 | default: 46 | return; 47 | } 48 | } 49 | void initialize_table(fl_Table table){ 50 | // Fill data array 51 | int r; 52 | int c; 53 | for (r = 0 ; rdraw_cell = &draw_cell; 70 | fl_Double_Window window = (fl_Double_Window)Fl_Double_Window_New_WithLabel(900,400,"Simple Table"); 71 | Fl_Double_Window_begin(window); 72 | fl_Table table = (fl_Table)Fl_Table_New(10,10,880,380,funcs); 73 | initialize_table(table); 74 | Fl_Double_Window_set_resizable(window, table); 75 | Fl_Double_Window_end(window); 76 | Fl_Double_Window_show(window); 77 | return (Fl_run()); 78 | } 79 | -------------------------------------------------------------------------------- /examples/tabs-simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | int main (int argc, char** argv){ 8 | Fl_set_scheme("gtk+"); 9 | fl_Window win = (fl_Window)Fl_Window_New_WithLabel(500,200,"Tabs Example"); 10 | { 11 | 12 | // Create the tab widget 13 | fl_Tabs tabs = (fl_Tabs)Fl_Tabs_New(10,10,500-20,200-20); 14 | { 15 | fl_Group aaa = (fl_Group)Fl_Group_New_WithLabel(10,35,500-20,200-45,"Aaa"); 16 | { 17 | fl_Button b1 = (fl_Button)Fl_Button_New_WithLabel(50, 60,90,25,"Button A1"); 18 | Fl_Button_set_color(b1,88+1); 19 | fl_Button b2 = (fl_Button)Fl_Button_New_WithLabel(50, 90,90,25,"Button A2"); 20 | Fl_Button_set_color(b2,88+2); 21 | fl_Button b3 = (fl_Button)Fl_Button_New_WithLabel(50, 120,90,25,"Button A3"); 22 | Fl_Button_set_color(b3,88+3); 23 | } 24 | Fl_Group_end(aaa); 25 | fl_Group bbb = (fl_Group)Fl_Group_New_WithLabel(10,35,500-20,200-45,"Bbb"); 26 | { 27 | fl_Button b1 = (fl_Button)Fl_Button_New_WithLabel(50, 60,90,25,"Button B1"); 28 | Fl_Button_set_color(b1,88+1); 29 | fl_Button b2 = (fl_Button)Fl_Button_New_WithLabel(150, 60,90,25,"Button B2"); 30 | Fl_Button_set_color(b2,88+3); 31 | fl_Button b3 = (fl_Button)Fl_Button_New_WithLabel(50, 60,90,25,"Button B3"); 32 | Fl_Button_set_color(b3,88+5); 33 | fl_Button b4 = (fl_Button)Fl_Button_New_WithLabel(50, 60,90,25,"Button B4"); 34 | Fl_Button_set_color(b4,88+2); 35 | fl_Button b5 = (fl_Button)Fl_Button_New_WithLabel(150, 60,90,25,"Button B5"); 36 | Fl_Button_set_color(b5,88+4); 37 | fl_Button b6 = (fl_Button)Fl_Button_New_WithLabel(250, 60,90,25,"Button B6"); 38 | Fl_Button_set_color(b6,88+6); 39 | } 40 | Fl_Group_end(bbb); 41 | } 42 | Fl_Tabs_end(tabs); 43 | } 44 | Fl_Window_end(win); 45 | Fl_Window_show_with_args(win, argc, argv); 46 | return (Fl_run()); 47 | } 48 | -------------------------------------------------------------------------------- /examples/textdisplay-with-colors.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | int main(int argc, char** argv){ 7 | Style_Table_Entry stable[] = { 8 | { FL_RED, FL_COURIER, 18 }, 9 | { FL_DARK_YELLOW, FL_COURIER, 18 }, 10 | { FL_DARK_GREEN, FL_COURIER, 18 }, 11 | { FL_BLUE, FL_COURIER, 18 }, 12 | }; 13 | fl_Window win = (fl_Window)Fl_Window_New_WithLabel(640, 480, "Simple Text Display With Colors"); 14 | fl_Text_Display disp = (fl_Text_Display)Fl_Text_Display_New(20, 20, 640-40, 480-40); 15 | fl_Text_Buffer tbuff = (fl_Text_Buffer)Fl_Text_Buffer_New(); 16 | fl_Text_Buffer sbuff = (fl_Text_Buffer)Fl_Text_Buffer_New(); 17 | Fl_Text_Display_set_buffer(disp,tbuff); 18 | int stable_size = sizeof(stable)/sizeof(stable[0]); // # entries in style table (4) 19 | Fl_Text_Display_highlight_data(disp,sbuff, stable, stable_size, 'A', 0, 0); 20 | Fl_Text_Buffer_set_text(tbuff,"Red Line 1\nYel Line 2\nGrn Line 3\nBlu Line 4\nRed Line 5\nYel Line 6\nGrn Line 7\nBlu Line 8\n"); 21 | Fl_Text_Buffer_set_text(sbuff,"AAAAAAAAAA\nBBBBBBBBBB\nCCCCCCCCCC\nDDDDDDDDDD\nAAAAAAAAAA\nBBBBBBBBBB\nCCCCCCCCCC\nDDDDDDDDDD\n"); 22 | Fl_Window_set_resizable(win,disp); 23 | Fl_Window_show(win); 24 | return (Fl_run()); 25 | } 26 | -------------------------------------------------------------------------------- /examples/texteditor-simple.c: -------------------------------------------------------------------------------- 1 | #include "Fl_C.h" 2 | #include "Fl_Double_WindowC.h" 3 | #include "Fl_Text_EditorC.h" 4 | #include "Fl_Text_BufferC.h" 5 | int main(int argc, char** argv){ 6 | fl_Double_Window win = (fl_Double_Window)Fl_Double_Window_New_WithLabel(640, 480, "Simple Fl_Text_Editor"); 7 | fl_Text_Buffer buff = (fl_Text_Buffer)Fl_Text_Buffer_New(); 8 | fl_Text_Editor edit = (fl_Text_Editor)Fl_Text_Editor_New(20, 20, 640-40, 480-40); 9 | Fl_Text_Editor_set_buffer(edit, buff); 10 | Fl_Double_Window_set_resizable(win,edit); 11 | Fl_Double_Window_show(win); 12 | Fl_Text_Buffer_set_text(buff,"line 0\nline 1\nline 2\nline 3\nline 4\nline 5\nline 6\nline 7\nline 8\nline 9\nline 10\nline 11\nline 12\nline 13\nline 14\nline 15\nline 16\nline 17\nline 18\nline 19\nline 20\nline 21\nline 22\nline 23\n"); 13 | return (Fl_run()); 14 | } 15 | -------------------------------------------------------------------------------- /examples/tree-simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_EnumerationsC.h" 4 | #include "Fl_Types.h" 5 | #include "Fl_WindowC.h" 6 | #include "Fl_TreeC.h" 7 | #include "Fl_Tree_ItemC.h" 8 | 9 | void TreeCallback(fl_Widget w, void* data){ 10 | fl_Tree tree = (fl_Tree)w; 11 | fl_Tree_Item item = (fl_Tree_Item)Fl_Tree_callback_item(tree); 12 | if (! item ) return; 13 | switch( Fl_Tree_callback_reason(tree)) { 14 | case FL_TREE_REASON_SELECTED: { 15 | char pathname[256]; 16 | Fl_Tree_item_pathname(tree,pathname, sizeof(pathname), item); 17 | printf("TreeCallback: Item selected='%s', Full pathname='%s'\n", (const char*)(Fl_Tree_Item_label(item)), pathname); 18 | break; 19 | } 20 | case FL_TREE_REASON_DESELECTED: 21 | printf("TreeCallback: Item '%s' deselected\n", (const char*)(Fl_Tree_Item_label(item))); 22 | break; 23 | case FL_TREE_REASON_OPENED: 24 | printf("TreeCallback: Item '%s' opened\n", (const char*)(Fl_Tree_Item_label(item))); 25 | break; 26 | case FL_TREE_REASON_CLOSED: 27 | printf("TreeCallback: Item '%s' closed\n", (const char*)(Fl_Tree_Item_label(item))); 28 | default: 29 | break; 30 | } 31 | } 32 | int main(int argc, char** argv) { 33 | Fl_set_scheme("gtk+"); 34 | fl_Window window = (fl_Window)Fl_Window_New_WithLabel(250,400,"Simple Tree"); 35 | Fl_Window_begin(window); 36 | fl_Tree tree = (fl_Tree)Fl_Tree_New(10,10,Fl_Window_w(window)-20,Fl_Window_h(window)-20); 37 | Fl_Tree_set_showroot(tree,0); 38 | 39 | Fl_Tree_add(tree,"Flintstones/Fred"); 40 | Fl_Tree_add(tree,"Flintstones/Wilma"); 41 | Fl_Tree_add(tree,"Flintstones/Pebbles"); 42 | Fl_Tree_add(tree,"Simpsons/Homer"); 43 | Fl_Tree_add(tree,"Simpsons/Marge"); 44 | Fl_Tree_add(tree,"Simpsons/Bart"); 45 | Fl_Tree_add(tree,"Simpsons/Lisa"); 46 | Fl_Tree_add(tree,"Pathnames/\\/bin"); // front slashes 47 | Fl_Tree_add(tree,"Pathnames/\\/usr\\/sbin"); 48 | Fl_Tree_add(tree,"Pathnames/C:\\\\Program Files"); // backslashes 49 | Fl_Tree_add(tree,"Pathnames/C:\\\\Documents and Settings"); 50 | 51 | Fl_Tree_close_with_path(tree,"Simpsons"); 52 | Fl_Tree_close_with_path(tree,"Pathnames"); 53 | Fl_Tree_set_callback(tree,TreeCallback); 54 | Fl_Window_end(window); 55 | Fl_Window_show(window); 56 | return Fl_run(); 57 | } 58 | -------------------------------------------------------------------------------- /examples/wizard-simple.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_C.h" 3 | #include "Fl_WindowC.h" 4 | #include "Fl_GroupC.h" 5 | #include "Fl_WizardC.h" 6 | #include "Fl_ButtonC.h" 7 | #include "Fl_Multiline_OutputC.h" 8 | 9 | fl_Window G_win = 0; 10 | fl_Wizard G_wiz = 0; 11 | 12 | void back_cb(fl_Widget w, void* user_data){ 13 | Fl_Wizard_prev(G_wiz); 14 | } 15 | void next_cb(fl_Widget w, void* user_data){ 16 | Fl_Wizard_next(G_wiz); 17 | } 18 | void done_cb(fl_Widget w, void* user_data){ 19 | exit(0); 20 | } 21 | int main (int argc, char** argv){ 22 | G_win = (fl_Window)Fl_Window_New_WithLabel(400,300,"Example Wizard"); 23 | G_wiz = (fl_Wizard)Fl_Wizard_New(0,0,400,300); 24 | Fl_Wizard_begin(G_wiz); 25 | { 26 | fl_Group g = (fl_Group)Fl_Group_New(0,0,400,300); 27 | fl_Button next = (fl_Button)Fl_Button_New_WithLabel(290,265,100,25,"Next @->"); 28 | Fl_Button_set_callback(next,next_cb); 29 | 30 | fl_Multiline_Output out = (fl_Multiline_Output)Fl_Multiline_Output_New_WithLabel(10,30,400-20,300-80,"Welcome"); 31 | Fl_Multiline_Output_set_labelsize(out,20); 32 | Fl_Multiline_Output_set_align(out, FL_ALIGN_TOP|FL_ALIGN_LEFT); 33 | Fl_Multiline_Output_set_value(out, "This is First page"); 34 | Fl_Group_end(g); 35 | } 36 | { 37 | fl_Group g = (fl_Group)Fl_Group_New(0,0,400,300); 38 | fl_Button next = (fl_Button)Fl_Button_New_WithLabel(290,265,100,25,"Next @->"); 39 | Fl_Button_set_callback(next,next_cb); 40 | 41 | fl_Button back = (fl_Button)Fl_Button_New_WithLabel(180,265,100,25,"@<- Back"); 42 | Fl_Button_set_callback(back,back_cb); 43 | 44 | fl_Multiline_Output out = (fl_Multiline_Output)Fl_Multiline_Output_New_WithLabel(10,30,400-20,300-80,"Terms And Conditions"); 45 | Fl_Multiline_Output_set_labelsize(out,20); 46 | Fl_Multiline_Output_set_align(out, FL_ALIGN_TOP|FL_ALIGN_LEFT); 47 | Fl_Multiline_Output_set_value(out, "This is Second page"); 48 | Fl_Group_end(g); 49 | } 50 | { 51 | fl_Group g = (fl_Group)Fl_Group_New(0,0,400,300); 52 | fl_Button next = (fl_Button)Fl_Button_New_WithLabel(290,265,100,25,"Next @->"); 53 | Fl_Button_set_callback(next,next_cb); 54 | 55 | fl_Button back = (fl_Button)Fl_Button_New_WithLabel(180,265,100,25,"@<- Back"); 56 | Fl_Button_set_callback(back,back_cb); 57 | 58 | fl_Multiline_Output out = (fl_Multiline_Output)Fl_Multiline_Output_New_WithLabel(10,30,400-20,300-80,"Finish"); 59 | Fl_Multiline_Output_set_labelsize(out,20); 60 | Fl_Multiline_Output_set_align(out, FL_ALIGN_TOP|FL_ALIGN_LEFT); 61 | Fl_Multiline_Output_set_value(out, "Finish"); 62 | Fl_Group_end(g); 63 | } 64 | Fl_Wizard_end(G_wiz); 65 | Fl_Window_end(G_win); 66 | Fl_Window_show_with_args(G_win,argc,argv); 67 | return (Fl_run()); 68 | } 69 | -------------------------------------------------------------------------------- /src/DerivedShared_Image.cpp: -------------------------------------------------------------------------------- 1 | #include "DerivedShared_Image.h" 2 | fl_Shared_Handler* DerivedShared_Image::fl_handlers_ = 0; 3 | int DerivedShared_Image::fl_num_handlers_ = 0; 4 | int DerivedShared_Image::fl_alloc_handlers_ = 0; 5 | // a total copy, needed because fl_Shared_Handler is different 6 | void DerivedShared_Image::add_handler(fl_Shared_Handler f){ 7 | int i; // Looping var... 8 | fl_Shared_Handler *temp; // New image handler array... 9 | 10 | // First see if we have already added the handler... 11 | for (i = 0; i < fl_num_handlers_; i ++) { 12 | if (fl_handlers_[i] == f) return; 13 | } 14 | if (fl_num_handlers_ >= fl_alloc_handlers_) { 15 | // Allocate more memory... 16 | temp = new fl_Shared_Handler [fl_alloc_handlers_ + 32]; 17 | 18 | if (alloc_handlers_) { 19 | memcpy(temp, fl_handlers_, fl_alloc_handlers_ * sizeof(fl_Shared_Handler)); 20 | 21 | delete[] fl_handlers_; 22 | } 23 | 24 | fl_handlers_ = temp; 25 | fl_alloc_handlers_ += 32; 26 | } 27 | 28 | fl_handlers_[fl_num_handlers_] = f; 29 | fl_num_handlers_ ++; 30 | } 31 | void DerivedShared_Image::reload(){ 32 | int i; 33 | FILE *fp; 34 | uchar header[64]; 35 | Fl_Image *img; 36 | 37 | if (!name_) return; 38 | 39 | if ((fp = fl_fopen(name_, "rb")) != NULL) { 40 | if (fread(header, 1, sizeof(header), fp)==0) { /* ignore */ } 41 | fclose(fp); 42 | } else { 43 | return; 44 | } 45 | 46 | if (memcmp(header, "#define", 7) == 0) // XBM file 47 | img = new Fl_XBM_Image(name_); 48 | else if (memcmp(header, "/* XPM */", 9) == 0) // XPM file 49 | img = new Fl_XPM_Image(name_); 50 | else { 51 | for (i = 0, img = 0; i < num_handlers_; i ++) { 52 | // The only difference is the cast 53 | img = (static_cast((fl_handlers_[i])(name_, header, sizeof(header)))); 54 | 55 | if (img) break; 56 | } 57 | } 58 | 59 | if (img) { 60 | if (alloc_image_) delete image_; 61 | 62 | alloc_image_ = 1; 63 | 64 | if ((img->w() != w() && w()) || (img->h() != h() && h())) { 65 | Fl_Image *temp = img->copy(w(), h()); 66 | delete img; 67 | image_ = temp; 68 | } else { 69 | image_ = img; 70 | } 71 | 72 | update(); 73 | } 74 | }; 75 | void DerivedShared_Image::remove_handler(fl_Shared_Handler f){ 76 | int i; // Looping var... 77 | // First see if the handler has been added... 78 | for (i = 0; i < fl_num_handlers_; i ++) { 79 | if (fl_handlers_[i] == f) break; 80 | } 81 | 82 | if (i >= fl_num_handlers_) return; 83 | 84 | // OK, remove the handler from the array... 85 | fl_num_handlers_ --; 86 | 87 | if (i < fl_num_handlers_) { 88 | // Shift later handlers down 1... 89 | memmove(fl_handlers_ + i, fl_handlers_ + i + 1, 90 | (fl_num_handlers_ - i) * sizeof(fl_Shared_Handler )); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /src/DerivedShared_Image.h: -------------------------------------------------------------------------------- 1 | #ifndef __DERIVEDSHARED_IMAGE__ 2 | #define __DERIVEDSHARED_IMAGE__ 3 | #include "FL/Fl.H" 4 | #include "FL/Fl_Shared_Image.H" 5 | #include "FL/Fl_XBM_Image.H" 6 | #include "FL/Fl_XPM_Image.H" 7 | #include "Fl_Types.h" 8 | typedef void* (*fl_Shared_Handler)(const char *name, uchar *header,int headerlen); 9 | class DerivedShared_Image : public Fl_Shared_Image { 10 | static fl_Shared_Handler* fl_handlers_; 11 | static int fl_num_handlers_; 12 | static int fl_alloc_handlers_; 13 | public: 14 | void reload(); 15 | static void add_handler(fl_Shared_Handler h); 16 | static void remove_handler(fl_Shared_Handler h); 17 | DerivedShared_Image() : Fl_Shared_Image() {}; 18 | DerivedShared_Image(const char *n, Fl_Image *img = 0) : Fl_Shared_Image(n, img) {}; 19 | }; 20 | 21 | #endif /* __DERIVEDSHARED_IMAGE__ */ 22 | -------------------------------------------------------------------------------- /src/DerivedText_Editor.h: -------------------------------------------------------------------------------- 1 | #ifndef __DERIVEDTEXT_EDITOR__ 2 | #define __DERIVEDTEXT_EDITOR__ 3 | #include "FL/Fl.H" 4 | #include "FL/Fl_Text_Editor.H" 5 | 6 | class C_to_Fl_Callback; 7 | 8 | class DerivedText_Editor : public Fl_Text_Editor { 9 | private: 10 | C_to_Fl_Callback* curr_callback_context; 11 | public: 12 | typedef int (*Key_Func)(int key, DerivedText_Editor* editor); 13 | struct Key_Binding_With_Callback { 14 | int key; 15 | int state; 16 | Key_Func callback; 17 | C_to_Fl_Callback* callback_context; 18 | Key_Binding_With_Callback* next; 19 | }; 20 | // points to the head of the list after it's done converting 21 | static Key_Binding_With_Callback* convert_keybindings (Fl_Text_Editor::Key_Binding* bindings); 22 | Key_Binding_With_Callback* get_default_keybindings(){ 23 | Fl_Text_Editor::Key_Binding* default_bindings = new Fl_Text_Editor::Key_Binding(); 24 | Fl_Text_Editor::add_default_key_bindings(&default_bindings); 25 | return DerivedText_Editor::convert_keybindings(default_bindings); 26 | } 27 | 28 | void add_default_key_bindings(Key_Binding_With_Callback** list){ 29 | Key_Binding_With_Callback* default_bindings = get_default_keybindings(); 30 | add_key_binding(default_bindings,list); 31 | } 32 | 33 | // Unlike Fl_Text_Editor a new binding is appended rather than prepended 34 | void add_key_binding(int key, int state, C_to_Fl_Callback* callback_context, 35 | Key_Binding_With_Callback** list); 36 | 37 | void add_key_binding(Key_Binding_With_Callback* back, 38 | Key_Binding_With_Callback** front){ 39 | Key_Binding_With_Callback* curr = *front; 40 | // iterate to the last binding 41 | while(curr->next){curr = curr->next;} 42 | curr->next = back; 43 | } 44 | void default_callback_context(C_to_Fl_Callback* context) { 45 | default_callback_context_ = context; 46 | } 47 | void add_key_binding(int key, int state, C_to_Fl_Callback* context){ 48 | add_key_binding(key,state,context,&key_bindings); 49 | } 50 | C_to_Fl_Callback* bound_key_function(int key, int state, Key_Binding_With_Callback* list); 51 | void remove_all_key_bindings(Key_Binding_With_Callback** list); 52 | void remove_all_key_bindings(); 53 | void remove_key_binding(int key, int state, Key_Binding_With_Callback** list); 54 | void remove_key_binding(int key, int state); 55 | Key_Binding_With_Callback* key_bindings; 56 | C_to_Fl_Callback* get_curr_callback_context(); 57 | C_to_Fl_Callback* get_default_callback_context(); 58 | DerivedText_Editor(int x,int y,int w,int h,const char* t=0); 59 | protected: 60 | int handle_key(); 61 | Key_Func default_key_function_; 62 | static Key_Binding_With_Callback* global_key_bindings; 63 | C_to_Fl_Callback* default_callback_context_; 64 | }; 65 | 66 | #endif /* __DERIVEDTEXT_EDITOR__ */ 67 | -------------------------------------------------------------------------------- /src/Fl_AskC.cpp: -------------------------------------------------------------------------------- 1 | // Unimplemented until I figure out what to do with all the varargs functions 2 | #include "Fl_AskC.h" 3 | #ifdef __cplusplus 4 | EXPORT { 5 | #endif 6 | FL_EXPORT_C(void,flc_beep)(){ 7 | fl_beep(); 8 | } 9 | FL_EXPORT_C(void,flc_beep_with_type)(int type){ 10 | fl_beep(type); 11 | } 12 | FL_EXPORT_C(void,flc_message)(const char* message){ 13 | return fl_message(message, NULL); 14 | } 15 | FL_EXPORT_C(void,flc_message_with_args)(const char* fmt,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10){ 16 | return fl_message(fmt,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); 17 | } 18 | FL_EXPORT_C(void,flc_alert)(const char* alert){ 19 | return fl_alert(alert, NULL); 20 | } 21 | FL_EXPORT_C(void,flc_alert_with_args)(const char* fmt,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10){ 22 | return fl_alert(fmt,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); 23 | } 24 | FL_EXPORT_C(int,flc_choice)(const char* q, const char* b0, const char* b1, const char* b2){ 25 | return fl_choice(q, b0,b1,b2,NULL); 26 | } 27 | FL_EXPORT_C(int,flc_choice_with_args)(const char *q,const char *b0,const char *b1,const char *b2,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10){ 28 | return fl_choice(q,b0,b1,b2,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); 29 | } 30 | FL_EXPORT_C(const char*,flc_input)(const char *label){ 31 | return fl_input(label,0,NULL); 32 | } 33 | FL_EXPORT_C(const char*,flc_input_with_deflt)(const char *label,const char* deflt){ 34 | return fl_input(label,deflt, NULL); 35 | } 36 | FL_EXPORT_C(const char*,flc_input_with_args)(const char *label,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10){ 37 | return fl_input(label,0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); 38 | } 39 | FL_EXPORT_C(const char *,flc_input_with_args_deflt)(const char *label,const char *deflt,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10){ 40 | return fl_input(label,deflt,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); 41 | } 42 | FL_EXPORT_C(const char *,flc_password)(const char *label){ 43 | return fl_password(label,0,NULL); 44 | } 45 | FL_EXPORT_C(const char *,flc_password_with_deflt)(const char *label,const char* deflt){ 46 | return fl_password(label,deflt,NULL); 47 | } 48 | FL_EXPORT_C(const char *,flc_password_with_args)(const char *label,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10){ 49 | return fl_password(label,0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); 50 | } 51 | FL_EXPORT_C(const char *,flc_password_with_args_deflt)(const char *label,const char *deflt,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10){ 52 | return fl_password(label,deflt,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10); 53 | } 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | -------------------------------------------------------------------------------- /src/Fl_AskC.h: -------------------------------------------------------------------------------- 1 | // Unimplemented until I figure out what to do with all the vararg 2 | #ifndef __FL_ASK_C__ 3 | #define __FL_ASK_C__ 4 | #ifdef __cplusplus 5 | // always include the FL/*.H headers before local headers 6 | // Fl_Widget is included transitively and needed for 7 | // the callback mechanism included below to work. 8 | #include "FL/Fl.H" 9 | #include "FL/fl_ask.H" 10 | #include "Fl_CallbackC.h" 11 | EXPORT { 12 | #endif 13 | FL_EXPORT_C(void,flc_beep)(); 14 | FL_EXPORT_C(void,flc_beep_with_type)(int type); 15 | FL_EXPORT_C(void,flc_message)(const char* message); 16 | FL_EXPORT_C(void,flc_message_with_args)(const char* fmt,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10); 17 | FL_EXPORT_C(void,flc_alert)(const char* alert); 18 | FL_EXPORT_C(void,flc_alert_with_args)(const char* fmt,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10); 19 | FL_EXPORT_C(int,flc_choice)(const char *q,const char *b0,const char *b1,const char *b2); 20 | FL_EXPORT_C(int,flc_choice_with_args)(const char *q,const char *b0,const char *b1,const char *b2,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10); 21 | FL_EXPORT_C(const char*,flc_input)(const char *label); 22 | FL_EXPORT_C(const char*,flc_input_with_deflt)(const char *label,const char* deflt); 23 | FL_EXPORT_C(const char*,flc_input_with_args)(const char *label,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10); 24 | FL_EXPORT_C(const char *,flc_input_with_args_deflt)(const char *label,const char *deflt,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10); 25 | FL_EXPORT_C(const char *,flc_password)(const char *label); 26 | FL_EXPORT_C(const char *,flc_password_with_deflt)(const char *label,const char* deflt); 27 | FL_EXPORT_C(const char *,flc_password_with_args)(const char *label,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10); 28 | FL_EXPORT_C(const char *,flc_password_with_args_deflt)(const char *label,const char *deflt,const char* arg1,const char* arg2,const char* arg3,const char* arg4,const char* arg5,const char* arg6,const char* arg7,const char* arg8,const char* arg9,const char* arg10); 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | #endif /* __FL_ASK_C__ */ 33 | -------------------------------------------------------------------------------- /src/Fl_BitmapC.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_BitmapC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(fl_Bitmap, Fl_Bitmap_New)(const char* bits, int W, int H){ 6 | Fl_Bitmap* b = new Fl_Bitmap(bits,W,H); 7 | return (fl_Bitmap)b; 8 | } 9 | FL_EXPORT_C(fl_Bitmap, Fl_Bitmap_New_WithUchar)(const uchar* bits, int W, int H){ 10 | Fl_Bitmap* b = new Fl_Bitmap(bits,W,H); 11 | return (fl_Bitmap)b; 12 | } 13 | FL_EXPORT_C(int,Fl_Bitmap_w)(fl_Bitmap bitmap){ 14 | return (static_cast(bitmap))->w(); 15 | } 16 | FL_EXPORT_C(int,Fl_Bitmap_h)(fl_Bitmap bitmap){ 17 | return (static_cast(bitmap))->h(); 18 | } 19 | FL_EXPORT_C(int,Fl_Bitmap_d)(fl_Bitmap bitmap){ 20 | return (static_cast(bitmap))->d(); 21 | } 22 | FL_EXPORT_C(int,Fl_Bitmap_ld)(fl_Bitmap bitmap){ 23 | return (static_cast(bitmap))->ld(); 24 | } 25 | FL_EXPORT_C(int,Fl_Bitmap_count)(fl_Bitmap bitmap){ 26 | return (static_cast(bitmap))->count(); 27 | } 28 | FL_EXPORT_C(fl_Bitmap,Fl_Bitmap_copy_with_w_h)(fl_Bitmap bitmap,int W,int H){ 29 | return (fl_Bitmap)(static_cast(bitmap))->copy(W,H); 30 | } 31 | FL_EXPORT_C(fl_Bitmap,Fl_Bitmap_copy)(fl_Bitmap bitmap){ 32 | return (fl_Bitmap)(static_cast(bitmap))->copy(); 33 | } 34 | FL_EXPORT_C(void,Fl_Bitmap_color_average)(fl_Bitmap bitmap,Fl_Color c,float i){ 35 | return (static_cast(bitmap))->color_average(c,i); 36 | } 37 | FL_EXPORT_C(void,Fl_Bitmap_inactive)(fl_Bitmap bitmap){ 38 | return (static_cast(bitmap))->inactive(); 39 | } 40 | FL_EXPORT_C(void,Fl_Bitmap_desaturate)(fl_Bitmap bitmap){ 41 | return (static_cast(bitmap))->desaturate(); 42 | } 43 | FL_EXPORT_C(void,Fl_Bitmap_label)(fl_Bitmap bitmap,fl_Widget w){ 44 | return (static_cast(bitmap))->label((static_cast(w))); 45 | } 46 | FL_EXPORT_C(void,Fl_Bitmap_label_with_menu_item)(fl_Bitmap bitmap,fl_Menu_Item m){ 47 | return (static_cast(bitmap))->label((static_cast(m))); 48 | } 49 | FL_EXPORT_C(void,Fl_Bitmap_draw_with_cx_cy)(fl_Bitmap bitmap,int X,int Y,int W,int H,int cx,int cy){ 50 | return (static_cast(bitmap))->draw(X,Y,W,H,cx,cy); 51 | } 52 | FL_EXPORT_C(void,Fl_Bitmap_draw_with_cx)(fl_Bitmap bitmap,int X,int Y,int W,int H,int cx){ 53 | return (static_cast(bitmap))->draw(X,Y,W,H,cx); 54 | } 55 | FL_EXPORT_C(void,Fl_Bitmap_draw_with_cy)(fl_Bitmap bitmap,int X,int Y,int W,int H,int cy){ 56 | return (static_cast(bitmap))->draw(X,Y,W,H,0,cy); 57 | } 58 | FL_EXPORT_C(void,Fl_Bitmap_draw)(fl_Bitmap bitmap,int X,int Y){ 59 | return (static_cast(bitmap))->draw(X,Y); 60 | } 61 | FL_EXPORT_C(void,Fl_Bitmap_uncache)(fl_Bitmap bitmap){ 62 | return (static_cast(bitmap))->uncache(); 63 | } 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | -------------------------------------------------------------------------------- /src/Fl_BitmapC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_BITMAP_C__ 2 | #define __FL_BITMAP_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_Bitmap.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | FL_EXPORT_C(void*, Fl_Bitmap_other_data)(fl_Bitmap bitmap); 13 | FL_EXPORT_C(void, Fl_Bitmap_set_other_data)(fl_Bitmap bitmap, void* v); 14 | FL_EXPORT_C(fl_Bitmap, Fl_Bitmap_New)(const char* bits, int H, int D); 15 | FL_EXPORT_C(fl_Bitmap, Fl_Bitmap_New_WithUchar)(const uchar* bits, int H, int D); 16 | FL_EXPORT_C(int, Fl_Bitmap_w)(fl_Bitmap bitmap); 17 | FL_EXPORT_C(int, Fl_Bitmap_h)(fl_Bitmap bitmap); 18 | FL_EXPORT_C(int, Fl_Bitmap_d)(fl_Bitmap bitmap); 19 | FL_EXPORT_C(int, Fl_Bitmap_ld)(fl_Bitmap bitmap); 20 | FL_EXPORT_C(int, Fl_Bitmap_count)(fl_Bitmap bitmap); 21 | FL_EXPORT_C(fl_Bitmap, Fl_Bitmap_copy_with_w_h)(fl_Bitmap bitmap,int W, int H); 22 | FL_EXPORT_C(fl_Bitmap, Fl_Bitmap_copy)(fl_Bitmap bitmap); 23 | FL_EXPORT_C(void, Fl_Bitmap_color_average)(fl_Bitmap bitmap,Fl_Color c, float i); 24 | FL_EXPORT_C(void, Fl_Bitmap_inactive)(fl_Bitmap bitmap); 25 | FL_EXPORT_C(void, Fl_Bitmap_desaturate)(fl_Bitmap bitmap); 26 | FL_EXPORT_C(void, Fl_Bitmap_label)(fl_Bitmap bitmap,fl_Widget w); 27 | FL_EXPORT_C(void, Fl_Bitmap_label_with_menu_item)(fl_Bitmap bitmap,fl_Menu_Item m); 28 | FL_EXPORT_C(void, Fl_Bitmap_draw_with_cx_cy)(fl_Bitmap bitmap,int X, int Y, int W, int H, int cx, int cy); 29 | FL_EXPORT_C(void, Fl_Bitmap_draw_with_cx)(fl_Bitmap bitmap,int X, int Y, int W, int H, int cx); 30 | FL_EXPORT_C(void, Fl_Bitmap_draw_with_cy)(fl_Bitmap bitmap,int X, int Y, int W, int H, int cy); 31 | FL_EXPORT_C(void, Fl_Bitmap_draw)(fl_Bitmap bitmap,int X, int Y); 32 | FL_EXPORT_C(void, Fl_Bitmap_uncache)(fl_Bitmap bitmap); 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | #endif /* __FL_BITMAP_C__ */ 37 | -------------------------------------------------------------------------------- /src/Fl_CallbackC.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "FL/Fl_Window.H" 3 | #include 4 | #include "Fl_CallbackC.h" 5 | 6 | C_to_Fl_Callback::C_to_Fl_Callback(Fl_Widget* invoker, fl_Callback* callback, void* user_data) { 7 | this->callback = callback; 8 | this->user_data = user_data; 9 | invoker->callback(intercept, this); 10 | } 11 | C_to_Fl_Callback::C_to_Fl_Callback(Fl_Widget* invoker, fl_Callback* callback) { 12 | this->callback = callback; 13 | this->user_data = invoker->user_data(); 14 | invoker->callback(intercept, this); 15 | } 16 | C_to_Fl_Callback::C_to_Fl_Callback(fl_Callback* callback){ 17 | this->callback = callback; 18 | this->user_data = NULL; 19 | } 20 | C_to_Fl_Callback::C_to_Fl_Callback(fl_Text_Buffer_Callback* callback, void* invoker){ 21 | this->text_buffer_callback = callback; 22 | this->user_data = invoker; 23 | } 24 | C_to_Fl_Callback::C_to_Fl_Callback(fl_Key_Func* key_func){ 25 | this->c_key_func = key_func; 26 | } 27 | C_to_Fl_Callback::C_to_Fl_Callback(Fl_Text_Editor::Key_Func* key_func){ 28 | this->cpp_key_func = key_func; 29 | } 30 | C_to_Fl_Callback::C_to_Fl_Callback(fl_Callback* callback, void* user_data){ 31 | this->callback = callback; 32 | this->user_data = user_data; 33 | } 34 | void C_to_Fl_Callback::set_callback(Fl_File_Chooser* c){ 35 | c->callback(intercept, this); 36 | } 37 | void C_to_Fl_Callback::set_callback(Fl_Menu_Item* item){ 38 | item->callback(intercept,this); 39 | } 40 | void C_to_Fl_Callback::set_callback(Fl_Text_Buffer* b){ 41 | b->transcoding_warning_action = intercept; 42 | } 43 | void* C_to_Fl_Callback::get_user_data(){ 44 | return this->user_data; 45 | } 46 | void C_to_Fl_Callback::set_user_data(void* user_data){ 47 | this->user_data = user_data; 48 | } 49 | int C_to_Fl_Callback::menu_insert(Fl_Menu_Item* item, int index, char* name, int shortcut, int flags){ 50 | return item->insert(index,name,shortcut,intercept,this,flags); 51 | } 52 | int C_to_Fl_Callback::menu_insert(Fl_Menu_* menu_, int index, char* name, int shortcut, int flags){ 53 | return menu_->insert(index,name,shortcut,intercept,this,flags); 54 | } 55 | int C_to_Fl_Callback::menu_insert(Fl_Menu_* menu_, int index, char* name, char* shortcut, int flags){ 56 | return menu_->insert(index,name,shortcut,intercept,this,flags); 57 | } 58 | int C_to_Fl_Callback::menu_add(Fl_Menu_Item* item, char* name, int shortcut, int flags){ 59 | return item->add(name, shortcut, intercept, this, flags); 60 | } 61 | int C_to_Fl_Callback::menu_add(Fl_Menu_Item* item, char* name, char* shortcut, int flags){ 62 | return item->add(name, shortcut, intercept, this, flags); 63 | } 64 | int C_to_Fl_Callback::menu_add(Fl_Menu_* menu_, char* name, char* shortcut, int flags){ 65 | return menu_->add(name,shortcut,intercept,this,flags); 66 | } 67 | int C_to_Fl_Callback::menu_add(Fl_Menu_* menu_, char* name, int shortcut, int flags){ 68 | return menu_->add(name,shortcut,intercept,this,flags); 69 | } 70 | void C_to_Fl_Callback::runCallback(Fl_Widget* w) { 71 | (*callback)((fl_Widget) w, user_data); 72 | } 73 | void C_to_Fl_Callback::runCallback() { 74 | (*text_buffer_callback)(user_data); 75 | } 76 | int C_to_Fl_Callback::runCallback(int key, DerivedText_Editor* editor){ 77 | int result; 78 | if (c_key_func){ 79 | result = (*c_key_func)(key, (fl_Text_Editor) editor); 80 | } 81 | else if (cpp_key_func) { 82 | result = (*cpp_key_func)(key, editor); 83 | } 84 | return result; 85 | } 86 | void C_to_Fl_Callback::runCallback(Fl_File_Chooser* c){ 87 | (*callback)((fl_File_Chooser) c, user_data); 88 | } 89 | int C_to_Fl_Callback::intercept(int key, fl_Text_Editor editor){ 90 | DerivedText_Editor* e = (static_cast(editor)); 91 | C_to_Fl_Callback* context = e->get_curr_callback_context(); 92 | return context->runCallback(key,e); 93 | } 94 | -------------------------------------------------------------------------------- /src/Fl_CallbackC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_CALLBACK_C__ 2 | #define __FL_CALLBACK_C__ 3 | 4 | #ifdef __cplusplus 5 | #include "Fl_ExportMacros.h" 6 | #include "Fl_Types.h" 7 | #include "DerivedText_Editor.h" 8 | #include 9 | #include "FL/Fl_Window.H" 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | /** 18 | Pass a C callback function to an Fl_Window 19 | */ 20 | class C_to_Fl_Callback { 21 | private: 22 | fl_Callback* callback; 23 | fl_Text_Buffer_Callback* text_buffer_callback; 24 | fl_Key_Func* c_key_func; 25 | Fl_Text_Editor::Key_Func* cpp_key_func; 26 | void* user_data; 27 | void runCallback(Fl_Widget* w); 28 | void runCallback(); 29 | int runCallback(int key, DerivedText_Editor* editor); 30 | void runCallback(Fl_File_Chooser* chooser); 31 | static void intercept(Fl_Widget* w, void* self) { 32 | ((C_to_Fl_Callback*)self)->runCallback(w); 33 | } 34 | static void intercept(Fl_Text_Buffer* self) { 35 | ((C_to_Fl_Callback*)self)->runCallback(); 36 | } 37 | static void intercept(Fl_File_Chooser* c, void* self){ 38 | ((C_to_Fl_Callback*)self)->runCallback(c); 39 | } 40 | // implementation needs DerivedText_Editor so it is separated 41 | public: 42 | static int intercept(int key, DerivedText_Editor* editor){ 43 | C_to_Fl_Callback* context = editor->get_curr_callback_context(); 44 | if (!context) context = editor->get_default_callback_context(); 45 | return context->runCallback(key,editor); 46 | }; 47 | static int intercept(int key, fl_Text_Editor editor); 48 | C_to_Fl_Callback(Fl_Widget* invoker, fl_Callback* callback, void* user_data); 49 | C_to_Fl_Callback(Fl_Widget* invoker, fl_Callback* callback); 50 | C_to_Fl_Callback(fl_Callback* callback); 51 | C_to_Fl_Callback(fl_Callback* callback, void* user_data); 52 | C_to_Fl_Callback(fl_Text_Buffer_Callback* callback, void* invoker); 53 | C_to_Fl_Callback(fl_Key_Func* key_func); 54 | C_to_Fl_Callback(Fl_Text_Editor::Key_Func* stored_key_func); 55 | C_to_Fl_Callback(Fl_File_Chooser* chooser, void* user_data); 56 | C_to_Fl_Callback(Fl_File_Chooser* chooser); 57 | void* get_user_data(); 58 | void set_callback(Fl_Menu_Item* item); 59 | void set_callback(Fl_Text_Buffer* b); 60 | void set_user_data(void* user_data); 61 | void set_callback(Fl_File_Chooser* b); 62 | int menu_insert(Fl_Menu_Item* item, int index, char* name, int shortcut, int flags = 0); 63 | int menu_insert(Fl_Menu_* menu_, int index, char* name, int shortcut, int flags = 0); 64 | int menu_insert(Fl_Menu_* menu_, int index, char* name, char* shortcut, int flags = 0); 65 | int menu_add(Fl_Menu_Item* item, char* name, int shortcut, int flags = 0); 66 | int menu_add(Fl_Menu_Item* item, char* name, char* shortcut, int flags = 0); 67 | int menu_add(Fl_Menu_* menu,char* name, char* shortcut, int flags = 0); 68 | int menu_add(Fl_Menu_* menu,char* name, int shortcut, int flags = 0); 69 | }; 70 | #endif 71 | #endif /* __FL_CALLBACK_C__ */ 72 | -------------------------------------------------------------------------------- /src/Fl_DeviceC.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_DeviceC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(const char*,Fl_Graphics_Driver_class_id)( ){ 6 | return Fl_Graphics_Driver::class_id; 7 | } 8 | FL_EXPORT_C(const char*,Fl_Graphics_Driver_class_name)(fl_Graphics_Driver graphics_driver){ 9 | return (static_cast(graphics_driver))->class_name(); 10 | } 11 | FL_EXPORT_C(void,Fl_Graphics_Driver_set_font)(fl_Graphics_Driver graphics_driver,Fl_Font face,Fl_Fontsize fsize){ 12 | return (static_cast(graphics_driver))->font(face,fsize); 13 | } 14 | FL_EXPORT_C(Fl_Font,Fl_Graphics_Driver_font)(fl_Graphics_Driver graphics_driver){ 15 | return (static_cast(graphics_driver))->font(); 16 | } 17 | FL_EXPORT_C(Fl_Fontsize,Fl_Graphics_Driver_size)(fl_Graphics_Driver graphics_driver){ 18 | return (static_cast(graphics_driver))->size(); 19 | } 20 | FL_EXPORT_C(double,Fl_Graphics_Driver_width)(fl_Graphics_Driver graphics_driver,const char* str,int n){ 21 | return (static_cast(graphics_driver))->width(str,n); 22 | } 23 | FL_EXPORT_C(double,Fl_Graphics_Driver_width_with_c)(fl_Graphics_Driver graphics_driver,unsigned int c){ 24 | return (static_cast(graphics_driver))->width(c); 25 | } 26 | FL_EXPORT_C(void,Fl_Graphics_Driver_text_extents)(fl_Graphics_Driver graphics_driver,const char* c,int n,int* dx,int* dy,int* w,int* h){ 27 | return (static_cast(graphics_driver))->text_extents(c,n,*dx,*dy,*w,*h); 28 | } 29 | FL_EXPORT_C(int,Fl_Graphics_Driver_height)(fl_Graphics_Driver graphics_driver){ 30 | return (static_cast(graphics_driver))->height(); 31 | } 32 | FL_EXPORT_C(int,Fl_Graphics_Driver_descent)(fl_Graphics_Driver graphics_driver){ 33 | return (static_cast(graphics_driver))->descent(); 34 | } 35 | FL_EXPORT_C(Fl_Color,Fl_Graphics_Driver_color)(fl_Graphics_Driver graphics_driver){ 36 | return (static_cast(graphics_driver))->color(); 37 | } 38 | FL_EXPORT_C(Fl_Font_Descriptor*,Fl_Graphics_Driver_font_descriptor)(fl_Graphics_Driver graphics_driver){ 39 | return (static_cast(graphics_driver))->font_descriptor(); 40 | } 41 | FL_EXPORT_C(void,Fl_Graphics_Driver_set_font_descriptor)(fl_Graphics_Driver graphics_driver,Fl_Font_Descriptor* d){ 42 | return (static_cast(graphics_driver))->font_descriptor(d); 43 | } 44 | FL_EXPORT_C(void,Fl_Graphics_Driver_Destroy)(fl_Graphics_Driver graphics_driver){ 45 | delete (static_cast(graphics_driver)); 46 | } 47 | FL_EXPORT_C(const char*,Fl_Surface_Device_class_id)( ){ 48 | return Fl_Surface_Device::class_id; 49 | } 50 | FL_EXPORT_C(const char*,Fl_Surface_Device_class_name)(fl_Surface_Device surface_device){ 51 | return (static_cast(surface_device))->class_name(); 52 | } 53 | FL_EXPORT_C(void,Fl_Surface_Device_set_current)(fl_Surface_Device surface_device){ 54 | return (static_cast(surface_device))->set_current(); 55 | } 56 | FL_EXPORT_C(void,Fl_Surface_Device_set_driver)(fl_Surface_Device surface_device,fl_Graphics_Driver graphics_driver){ 57 | return (static_cast(surface_device))->driver((static_cast(graphics_driver))); 58 | } 59 | FL_EXPORT_C(fl_Graphics_Driver,Fl_Surface_Device_driver)(fl_Surface_Device surface_device){ 60 | return (fl_Graphics_Driver)(static_cast(surface_device))->driver(); 61 | } 62 | FL_EXPORT_C(fl_Surface_Device,Fl_Surface_Device_surface)(){ 63 | return (fl_Surface_Device)Fl_Surface_Device::surface(); 64 | } 65 | FL_EXPORT_C(void,Fl_Surface_Device_Destroy)(fl_Surface_Device surface_device){ 66 | delete (static_cast(surface_device)); 67 | } 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | -------------------------------------------------------------------------------- /src/Fl_DeviceC.h: -------------------------------------------------------------------------------- 1 | #ifndef __Fl_DeviceC__ 2 | #define __Fl_DeviceC__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // X is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_Device.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | //Fl_Graphics_Driver 13 | FL_EXPORT_C(const char*, Fl_Graphics_Driver_class_id)(); 14 | FL_EXPORT_C(const char*, Fl_Graphics_Driver_class_name)(fl_Graphics_Driver graphics_driver); 15 | FL_EXPORT_C(const char*, Fl_Graphics_Driver_class_id)(); 16 | FL_EXPORT_C(const char*, Fl_Graphics_Driver_class_name)(fl_Graphics_Driver graphics_driver); 17 | FL_EXPORT_C(void, Fl_Graphics_Driver_set_font)(fl_Graphics_Driver graphics_driver,Fl_Font face, Fl_Fontsize fsize); 18 | FL_EXPORT_C(Fl_Font, Fl_Graphics_Driver_font)(fl_Graphics_Driver graphics_driver); 19 | FL_EXPORT_C(Fl_Fontsize, Fl_Graphics_Driver_size)(fl_Graphics_Driver graphics_driver); 20 | FL_EXPORT_C(double, Fl_Graphics_Driver_width)(fl_Graphics_Driver graphics_driver,const char* str, int n); 21 | FL_EXPORT_C(double, Fl_Graphics_Driver_width_with_c)(fl_Graphics_Driver graphics_driver,unsigned int c); 22 | FL_EXPORT_C(void, Fl_Graphics_Driver_text_extents)(fl_Graphics_Driver graphics_driver,const char*, int n, int* dx, int* dy, int* w, int* h);; 23 | FL_EXPORT_C(int, Fl_Graphics_Driver_height)(fl_Graphics_Driver graphics_driver); 24 | FL_EXPORT_C(int, Fl_Graphics_Driver_descent)(fl_Graphics_Driver graphics_driver); 25 | FL_EXPORT_C(Fl_Color, Fl_Graphics_Driver_color)(fl_Graphics_Driver graphics_driver); 26 | FL_EXPORT_C(Fl_Font_Descriptor*, Fl_Graphics_Driver_font_descriptor)(fl_Graphics_Driver graphics_driver); 27 | FL_EXPORT_C(void, Fl_Graphics_Driver_set_font_descriptor)(fl_Graphics_Driver graphics_driver,Fl_Font_Descriptor* d); 28 | FL_EXPORT_C(void, Fl_Graphics_Driver_Destroy)(fl_Graphics_Driver graphics_driver); 29 | 30 | // Fl_Surface_Device 31 | FL_EXPORT_C(const char*, Fl_Surface_Device_class_id)(); 32 | FL_EXPORT_C(const char*, Fl_Surface_Device_class_name)(fl_Surface_Device surface_device); 33 | FL_EXPORT_C(const char*, Fl_Surface_Device_class_id)(); 34 | FL_EXPORT_C(const char*, Fl_Surface_Device_class_name)(fl_Surface_Device surface_device); 35 | FL_EXPORT_C(void, Fl_Surface_Device_set_current)(fl_Surface_Device surface_device); 36 | FL_EXPORT_C(void, Fl_Surface_Device_set_driver)(fl_Surface_Device surface_device,fl_Graphics_Driver graphics_driver); 37 | FL_EXPORT_C(fl_Graphics_Driver, Fl_Surface_Device_driver)(fl_Surface_Device surface_device); 38 | FL_EXPORT_C(fl_Surface_Device, Fl_Surface_Device_surface)(); 39 | FL_EXPORT_C(void, Fl_Surface_Device_Destroy)(fl_Surface_Device surface_device); 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif /* __Fl_DeviceC__ */ 44 | -------------------------------------------------------------------------------- /src/Fl_EnumerationsC.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "Fl_ExportMacros.h" 3 | #ifdef __cplusplus 4 | #include "Fl_EnumerationsC.h" 5 | EXPORT { 6 | #endif 7 | FL_EXPORT_C(Fl_Boxtype, fl_define_FL_ROUND_UP_BOXC)(){ return fl_define_FL_ROUND_UP_BOX();} 8 | FL_EXPORT_C(Fl_Boxtype, fl_define_FL_SHADOW_BOXC)(){ return fl_define_FL_SHADOW_BOX();} 9 | FL_EXPORT_C(Fl_Boxtype, fl_define_FL_ROUNDED_BOXC)(){ return fl_define_FL_ROUNDED_BOX();} 10 | FL_EXPORT_C(Fl_Boxtype, fl_define_FL_RFLAT_BOXC)(){ return fl_define_FL_RFLAT_BOX();} 11 | FL_EXPORT_C(Fl_Boxtype, fl_define_FL_RSHADOW_BOXC)(){ return fl_define_FL_RSHADOW_BOX();} 12 | FL_EXPORT_C(Fl_Boxtype, fl_define_FL_DIAMOND_BOXC)(){ return fl_define_FL_DIAMOND_BOX();} 13 | FL_EXPORT_C(Fl_Boxtype, fl_define_FL_OVAL_BOXC)(){ return fl_define_FL_OVAL_BOX(); } 14 | FL_EXPORT_C(Fl_Boxtype, fl_define_FL_PLASTIC_UP_BOXC)(){ return fl_define_FL_PLASTIC_UP_BOX();} 15 | FL_EXPORT_C(Fl_Boxtype, fl_define_FL_GTK_UP_BOXC)(){ return fl_define_FL_GTK_UP_BOX();} 16 | FL_EXPORT_C(Fl_Boxtype, fl_boxC)(Fl_Boxtype b) { return fl_box(b);} 17 | FL_EXPORT_C(Fl_Boxtype, fl_downC)(Fl_Boxtype b) { return fl_down(b);} 18 | FL_EXPORT_C(Fl_Boxtype, fl_frameC)(Fl_Boxtype b) { return fl_frame(b);} 19 | FL_EXPORT_C(Fl_Labeltype, fl_define_FL_SHADOW_LABELC)() { return fl_define_FL_SHADOW_LABEL();} 20 | FL_EXPORT_C(Fl_Labeltype, fl_define_FL_ENGRAVED_LABELC)() { return fl_define_FL_ENGRAVED_LABEL();} 21 | FL_EXPORT_C(Fl_Labeltype, fl_define_FL_EMBOSSED_LABELC)() { return fl_define_FL_EMBOSSED_LABEL();} 22 | FL_EXPORT_C(Fl_Align, FL_ALIGN_TOP_LEFTC)(){ return FL_ALIGN_TOP | FL_ALIGN_LEFT;} 23 | FL_EXPORT_C(Fl_Align, FL_ALIGN_TOP_RIGHTC)(){ return FL_ALIGN_TOP | FL_ALIGN_RIGHT;} 24 | FL_EXPORT_C(Fl_Align, FL_ALIGN_BOTTOM_LEFTC)(){ return FL_ALIGN_BOTTOM | FL_ALIGN_LEFT;} 25 | FL_EXPORT_C(Fl_Align, FL_ALIGN_BOTTOM_RIGHTC)(){ return FL_ALIGN_BOTTOM | FL_ALIGN_RIGHT;} 26 | FL_EXPORT_C(Fl_Color, fl_inactiveC)(Fl_Color c) { return fl_inactive(c);}; 27 | FL_EXPORT_C(Fl_Color, fl_contrastC)(Fl_Color fg, Fl_Color bg) { return fl_contrast(fg,bg);} 28 | FL_EXPORT_C(Fl_Color, fl_color_averageC)(Fl_Color c1, Fl_Color c2, float weight){ return fl_color_average(c1,c2,weight);} 29 | FL_EXPORT_C(Fl_Color, fl_lighterC)(Fl_Color c){return fl_lighter(c);} 30 | FL_EXPORT_C(Fl_Color, fl_darkerC)(Fl_Color c){return fl_darker(c);} 31 | FL_EXPORT_C(Fl_Color, fl_rgb_color_with_rgb_C)(uchar r, uchar g, uchar b){return fl_rgb_color(r,g,b);} 32 | FL_EXPORT_C(Fl_Color, fl_rgb_colorC_with_grayscale_C)(uchar g){return fl_rgb_color(g);} 33 | FL_EXPORT_C(Fl_Color, fl_gray_rampC)(int i){return fl_gray_ramp(i);} 34 | FL_EXPORT_C(Fl_Color, fl_color_cubeC)(int r, int g, int b){return fl_color_cube(r,g,b);} 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | -------------------------------------------------------------------------------- /src/Fl_ExportMacros.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_EXPORT_H 2 | #define __FL_EXPORT_H 3 | 4 | #ifdef EXPORT 5 | #undef EXPORT 6 | #endif 7 | #define EXPORT extern "C" 8 | 9 | #ifdef __WATCOMC__ 10 | #include 11 | #define FL_EXPORT_C(TYPE,FUNC_NAME) TYPE __export __cdecl FUNC_NAME 12 | #else 13 | #ifdef _WIN32 14 | #define FL_EXPORT_C(TYPE,FUNC_NAME) __declspec(dllexport) TYPE __cdecl FUNC_NAME 15 | #undef EXPORT 16 | #define EXPORT extern "C" __declspec(dllexport) 17 | #else 18 | #define FL_EXPORT_C(TYPE,FUNC_NAME) TYPE FUNC_NAME 19 | #endif 20 | #ifndef _cdecl 21 | #define _cdecl 22 | #endif 23 | #endif 24 | #endif /* #ifndef __FL_EXPORT_H */ 25 | -------------------------------------------------------------------------------- /src/Fl_File_IconC.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_File_IconC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(fl_File_Icon, Fl_File_Icon_New)(const char* p, int t, int nd, short* d){ 6 | Fl_File_Icon* i = new Fl_File_Icon(p,t,nd,d); 7 | return (fl_File_Icon)i; 8 | } 9 | FL_EXPORT_C(void, Fl_File_Icon_Destroy)(fl_File_Icon file_icon){ 10 | delete (static_cast(file_icon)); 11 | } 12 | 13 | FL_EXPORT_C(short*,Fl_File_Icon_add)(fl_File_Icon file_icon,short d){ 14 | return (static_cast(file_icon))->add(d); 15 | } 16 | FL_EXPORT_C(short*,Fl_File_Icon_add_color)(fl_File_Icon file_icon,Fl_Color c){ 17 | return (static_cast(file_icon))->add_color(c); 18 | } 19 | FL_EXPORT_C(short*,Fl_File_Icon_add_vertex)(fl_File_Icon file_icon,float x,float y){ 20 | return (static_cast(file_icon))->add_vertex(x,y); 21 | } 22 | FL_EXPORT_C(void,Fl_File_Icon_clear)(fl_File_Icon file_icon){ 23 | (static_cast(file_icon))->clear(); 24 | } 25 | FL_EXPORT_C(void,Fl_File_Icon_draw)(fl_File_Icon file_icon,int x,int y,int w,int h,Fl_Color ic){ 26 | (static_cast(file_icon))->draw(x,y,w,h,ic); 27 | } 28 | FL_EXPORT_C(void,Fl_File_Icon_draw_with_active)(fl_File_Icon file_icon,int x,int y,int w,int h,Fl_Color ic,int active){ 29 | (static_cast(file_icon))->draw(x,y,w,h,ic,active); 30 | } 31 | FL_EXPORT_C(void,Fl_File_Icon_label)(fl_File_Icon file_icon,fl_Widget w){ 32 | (static_cast(file_icon))->label((static_cast(w))); 33 | } 34 | FL_EXPORT_C(void,Fl_File_Icon_load)(fl_File_Icon file_icon,const char* f){ 35 | (static_cast(file_icon))->load(f); 36 | } 37 | FL_EXPORT_C(int,Fl_File_Icon_load_fti)(fl_File_Icon file_icon,const char* fti){ 38 | return (static_cast(file_icon))->load_fti(fti); 39 | } 40 | FL_EXPORT_C(int,Fl_File_Icon_load_image)(fl_File_Icon file_icon,const char* i){ 41 | return (static_cast(file_icon))->load_image(i); 42 | } 43 | FL_EXPORT_C(fl_File_Icon,Fl_File_Icon_next)(fl_File_Icon file_icon){ 44 | return (fl_File_Icon)(static_cast(file_icon))->next(); 45 | } 46 | FL_EXPORT_C(const char*,Fl_File_Icon_pattern)(fl_File_Icon file_icon){ 47 | return (static_cast(file_icon))->pattern(); 48 | } 49 | FL_EXPORT_C(int,Fl_File_Icon_size)(fl_File_Icon file_icon){ 50 | return (static_cast(file_icon))->size(); 51 | } 52 | FL_EXPORT_C(int,Fl_File_Icon_type)(fl_File_Icon file_icon){ 53 | return (static_cast(file_icon))->type(); 54 | } 55 | FL_EXPORT_C(short*,Fl_File_Icon_value)(fl_File_Icon file_icon){ 56 | return (static_cast(file_icon))->value(); 57 | } 58 | FL_EXPORT_C(void,Fl_File_Icon_labeltype)(fl_Label o,int x,int y,int w,int h,Fl_Align a){ 59 | Fl_File_Icon::labeltype((static_cast(o)),x,y,w,h,a); 60 | } 61 | FL_EXPORT_C(fl_File_Icon,Fl_File_Icon_find)(const char* filename,int filetype){ 62 | return (fl_File_Icon)Fl_File_Icon::find(filename); 63 | } 64 | FL_EXPORT_C(fl_File_Icon,Fl_File_Icon_find_with_filetype)(const char* filename,int filetype){ 65 | return (fl_File_Icon)Fl_File_Icon::find(filename, filetype); 66 | } 67 | FL_EXPORT_C(fl_File_Icon,Fl_File_Icon_first)( ){ 68 | return (fl_File_Icon)Fl_File_Icon::first(); 69 | } 70 | FL_EXPORT_C(void,Fl_File_Icon_load_system_icons)( ){ 71 | Fl_File_Icon::load_system_icons(); 72 | } 73 | #ifdef __cplusplus 74 | } 75 | #endif 76 | -------------------------------------------------------------------------------- /src/Fl_File_IconC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_FILE_ICON_C__ 2 | #define __FL_FILE_ICON_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_File_Icon.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | FL_EXPORT_C(fl_File_Icon, Fl_File_Icon_New)(const char* p, int t, int nd, short* d); 13 | FL_EXPORT_C(void , Fl_File_Icon_Destroy)(fl_File_Icon file_icon); 14 | FL_EXPORT_C(short*, Fl_File_Icon_add)(fl_File_Icon file_icon, short d); 15 | FL_EXPORT_C(short*, Fl_File_Icon_add_color)(fl_File_Icon file_icon, Fl_Color c); 16 | FL_EXPORT_C(short*, Fl_File_Icon_add_vertex)(fl_File_Icon file_icon, float x, float y); 17 | FL_EXPORT_C(void, Fl_File_Icon_clear)(fl_File_Icon file_icon); 18 | FL_EXPORT_C(void, Fl_File_Icon_draw)(fl_File_Icon file_icon, int x, int y, int w, int h, Fl_Color ic); 19 | FL_EXPORT_C(void, Fl_File_Icon_draw_with_active)(fl_File_Icon file_icon, int x, int y, int w, int h, Fl_Color ic, int active); 20 | FL_EXPORT_C(void, Fl_File_Icon_label)(fl_File_Icon file_icon, fl_Widget w); 21 | FL_EXPORT_C(void, Fl_File_Icon_load)(fl_File_Icon file_icon, const char* f); 22 | FL_EXPORT_C(int, Fl_File_Icon_load_fti)(fl_File_Icon file_icon, const char* fti); 23 | FL_EXPORT_C(int, Fl_File_Icon_load_image)(fl_File_Icon file_icon, const char* i); 24 | FL_EXPORT_C(fl_File_Icon, Fl_File_Icon_next)(fl_File_Icon file_icon); 25 | FL_EXPORT_C(const char*, Fl_File_Icon_pattern)(fl_File_Icon file_icon); 26 | FL_EXPORT_C(int, Fl_File_Icon_size)(fl_File_Icon file_icon); 27 | FL_EXPORT_C(int, Fl_File_Icon_type)(fl_File_Icon file_icon); 28 | FL_EXPORT_C(short*, Fl_File_Icon_value)(fl_File_Icon file_icon); 29 | FL_EXPORT_C(void, Fl_File_Icon_labeltype)(fl_Label o, int x, int y, int w, int h, Fl_Align a); 30 | FL_EXPORT_C(fl_File_Icon, Fl_File_Icon_find)(const char* filename, int filetype); 31 | FL_EXPORT_C(fl_File_Icon, Fl_File_Icon_find_with_filetype)(const char* filename, int filetype); 32 | FL_EXPORT_C(fl_File_Icon, Fl_File_Icon_first)(); 33 | FL_EXPORT_C(void, Fl_File_Icon_load_system_icons)(); 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | #endif /* __FL_FILE_ICON_C__ */ 38 | -------------------------------------------------------------------------------- /src/Fl_ImageC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_IMAGE_C__ 2 | #define __FL_IMAGE_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_Image.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | class Fl_DerivedImage : public Fl_Image { 12 | fl_Image_Virtual_Funcs* overriddenFuncs; 13 | void* other_data; 14 | public: 15 | void* get_other_data(); 16 | void set_other_data(void*); 17 | void destroy_data(); 18 | void color_average(Fl_Color c, float i); 19 | Fl_Image* copy(); 20 | Fl_Image* copy(int W, int H); 21 | void desaturate(); 22 | void label(Fl_Widget* w); 23 | void label(Fl_Menu_Item* m); 24 | void draw(int X, int Y, int W, int H, int cx=0, int cy=0); 25 | void uncache(); 26 | void draw_box(); 27 | void draw_box(Fl_Boxtype t, Fl_Color c); 28 | void draw_box(Fl_Boxtype t, int x,int y,int w,int h, Fl_Color c); 29 | void draw_backdrop(); 30 | void draw_focus(); 31 | void draw_focus(Fl_Boxtype t, int x,int y,int w,int h); 32 | void draw_label(); 33 | Fl_DerivedImage(int W, int H, int D, fl_Image_Virtual_Funcs* funcs); 34 | ~Fl_DerivedImage(); 35 | }; 36 | #endif 37 | FL_EXPORT_C(fl_Image_Virtual_Funcs*, Fl_Image_default_virtual_funcs)(); 38 | FL_EXPORT_C(void*, Fl_Image_other_data)(fl_Image image); 39 | FL_EXPORT_C(void, Fl_Image_set_other_data)(fl_Image image, void* v); 40 | FL_EXPORT_C(fl_Image, Fl_Image_New)(int W, int H, int D); 41 | FL_EXPORT_C(fl_Image, Fl_OverriddenImage_New)(int W, int H, int D, fl_Image_Virtual_Funcs* fs); 42 | FL_EXPORT_C(int, Fl_Image_w)(fl_Image image); 43 | FL_EXPORT_C(int, Fl_Image_h)(fl_Image image); 44 | FL_EXPORT_C(int, Fl_Image_d)(fl_Image image); 45 | FL_EXPORT_C(int, Fl_Image_ld)(fl_Image image); 46 | FL_EXPORT_C(int, Fl_Image_count)(fl_Image image); 47 | FL_EXPORT_C(fl_Image, Fl_Image_copy_with_w_h)(fl_Image image,int W, int H); 48 | FL_EXPORT_C(fl_Image, Fl_Image_copy)(fl_Image image); 49 | FL_EXPORT_C(void, Fl_Image_color_average)(fl_Image image,Fl_Color c, float i); 50 | FL_EXPORT_C(void, Fl_Image_inactive)(fl_Image image); 51 | FL_EXPORT_C(void, Fl_Image_desaturate)(fl_Image image); 52 | FL_EXPORT_C(void, Fl_Image_label)(fl_Image image,fl_Widget w); 53 | FL_EXPORT_C(void, Fl_Image_label_with_menu_item)(fl_Image image,fl_Menu_Item m); 54 | FL_EXPORT_C(void, Fl_Image_draw_with_cx_cy)(fl_Image image,int X, int Y, int W, int H, int cx, int cy); 55 | FL_EXPORT_C(void, Fl_Image_draw_with_cx)(fl_Image image,int X, int Y, int W, int H, int cx); 56 | FL_EXPORT_C(void, Fl_Image_draw_with_cy)(fl_Image image,int X, int Y, int W, int H, int cy); 57 | FL_EXPORT_C(void, Fl_Image_draw)(fl_Image image,int X, int Y); 58 | FL_EXPORT_C(void, Fl_Image_uncache)(fl_Image image); 59 | #ifdef __cplusplus 60 | } 61 | #endif 62 | #endif /* __FL_xxx_C__ */ 63 | -------------------------------------------------------------------------------- /src/Fl_Native_File_ChooserC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_NATIVE_FILE_CHOOSER_C__ 2 | #define __FL_NATIVE_FILE_CHOOSER_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_Native_File_Chooser.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | #ifndef INTERNAL_LINKAGE 13 | enum Type { 14 | BROWSE_FILE = 0, 15 | BROWSE_DIRECTORY, 16 | BROWSE_MULTI_FILE, 17 | BROWSE_MULTI_DIRECTORY, 18 | BROWSE_SAVE_FILE, 19 | BROWSE_SAVE_DIRECTORY 20 | }; 21 | enum Option { 22 | NO_OPTIONS = 0x0000, 23 | SAVEAS_CONFIRM = 0x0001, 24 | NEW_FOLDER = 0x0002, 25 | PREVIEW = 0x0004, 26 | USE_FILTER_EXT = 0x0008 27 | }; 28 | #endif 29 | FL_EXPORT_C(fl_Native_File_Chooser, Fl_Native_File_Chooser_New_WithVal)(int val); 30 | FL_EXPORT_C(fl_Native_File_Chooser, Fl_Native_File_Chooser_New)(); 31 | FL_EXPORT_C(void, Fl_Native_File_Chooser_set_type)(fl_Native_File_Chooser chooser, int type); 32 | FL_EXPORT_C(int, Fl_Native_File_Chooser_type)(fl_Native_File_Chooser chooser); 33 | FL_EXPORT_C(void, Fl_Native_File_Chooser_set_options)(fl_Native_File_Chooser chooser, int options); 34 | FL_EXPORT_C(int, Fl_Native_File_Chooser_options)(fl_Native_File_Chooser chooser); 35 | FL_EXPORT_C(int, Fl_Native_File_Chooser_count)(fl_Native_File_Chooser chooser); 36 | FL_EXPORT_C(const char*, Fl_Native_File_Chooser_filename)(fl_Native_File_Chooser chooser); 37 | FL_EXPORT_C(const char*, Fl_Native_File_Chooser_filename_with_i)(fl_Native_File_Chooser chooser, int i); 38 | FL_EXPORT_C(void, Fl_Native_File_Chooser_set_directory)(fl_Native_File_Chooser chooser, const char *val); 39 | FL_EXPORT_C(const char*, Fl_Native_File_Chooser_directory)(fl_Native_File_Chooser chooser); 40 | FL_EXPORT_C(void, Fl_Native_File_Chooser_set_title)(fl_Native_File_Chooser chooser, const char *); 41 | FL_EXPORT_C(const char*, Fl_Native_File_Chooser_title)(fl_Native_File_Chooser chooser); 42 | FL_EXPORT_C(const char*, Fl_Native_File_Chooser_filter)(fl_Native_File_Chooser chooser); 43 | FL_EXPORT_C(void, Fl_Native_File_Chooser_set_filter)(fl_Native_File_Chooser chooser, const char *); 44 | FL_EXPORT_C(int, Fl_Native_File_Chooser_filters)(fl_Native_File_Chooser chooser); 45 | FL_EXPORT_C(void, Fl_Native_File_Chooser_set_filter_value)(fl_Native_File_Chooser chooser, int i); 46 | FL_EXPORT_C(int, Fl_Native_File_Chooser_filter_value)(fl_Native_File_Chooser chooser); 47 | FL_EXPORT_C(void, Fl_Native_File_Chooser_set_preset_file)(fl_Native_File_Chooser chooser, const char*); 48 | FL_EXPORT_C(const char*, Fl_Native_File_Chooser_preset_file)(fl_Native_File_Chooser chooser); 49 | FL_EXPORT_C(const char*, Fl_Native_File_Chooser_errmsg)(fl_Native_File_Chooser chooser); 50 | FL_EXPORT_C(int, Fl_Native_File_Chooser_show)(fl_Native_File_Chooser chooser); 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | #endif /* __FL_NATIVE_FILE_CHOOSER_C__ */ 55 | -------------------------------------------------------------------------------- /src/Fl_PNM_ImageC.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_PNM_ImageC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(fl_PNM_Image, Fl_PNM_Image_New)(const char* filename){ 6 | Fl_PNM_Image* i = new Fl_PNM_Image(filename); 7 | return (fl_PNM_Image)i; 8 | } 9 | FL_EXPORT_C(void, Fl_PNM_Image_Destroy)(fl_PNM_Image image){ 10 | delete (static_cast(image)); 11 | } 12 | FL_EXPORT_C(int,Fl_PNM_Image_w)(fl_PNM_Image image){ 13 | return (static_cast(image))->w(); 14 | } 15 | FL_EXPORT_C(int,Fl_PNM_Image_h)(fl_PNM_Image image){ 16 | return (static_cast(image))->h(); 17 | } 18 | FL_EXPORT_C(int,Fl_PNM_Image_d)(fl_PNM_Image image){ 19 | return (static_cast(image))->d(); 20 | } 21 | FL_EXPORT_C(int,Fl_PNM_Image_ld)(fl_PNM_Image image){ 22 | return (static_cast(image))->ld(); 23 | } 24 | FL_EXPORT_C(int,Fl_PNM_Image_count)(fl_PNM_Image image){ 25 | return (static_cast(image))->count(); 26 | } 27 | FL_EXPORT_C(fl_PNM_Image,Fl_PNM_Image_copy_with_w_h)(fl_PNM_Image image,int W,int H){ 28 | return (fl_PNM_Image)(static_cast(image))->copy(W,H); 29 | } 30 | FL_EXPORT_C(fl_PNM_Image,Fl_PNM_Image_copy)(fl_PNM_Image image){ 31 | return (fl_PNM_Image)(static_cast(image))->copy(); 32 | } 33 | FL_EXPORT_C(void,Fl_PNM_Image_color_average)(fl_PNM_Image image,Fl_Color c,float i){ 34 | return (static_cast(image))->color_average(c,i); 35 | } 36 | FL_EXPORT_C(void,Fl_PNM_Image_inactive)(fl_PNM_Image image){ 37 | return (static_cast(image))->inactive(); 38 | } 39 | FL_EXPORT_C(void,Fl_PNM_Image_desaturate)(fl_PNM_Image image){ 40 | return (static_cast(image))->desaturate(); 41 | } 42 | FL_EXPORT_C(void,Fl_PNM_Image_label)(fl_PNM_Image image,fl_Widget w){ 43 | return (static_cast(image))->label((static_cast(w))); 44 | } 45 | FL_EXPORT_C(void,Fl_PNM_Image_label_with_menu_item)(fl_PNM_Image image,fl_Menu_Item m){ 46 | return (static_cast(image))->label((static_cast(m))); 47 | } 48 | FL_EXPORT_C(void,Fl_PNM_Image_draw_with_cx_cy)(fl_PNM_Image image,int X,int Y,int W,int H,int cx,int cy){ 49 | return (static_cast(image))->draw(X,Y,W,H,cx,cy); 50 | } 51 | FL_EXPORT_C(void,Fl_PNM_Image_draw_with_cx)(fl_PNM_Image image,int X,int Y,int W,int H,int cx){ 52 | return (static_cast(image))->draw(X,Y,W,H,cx); 53 | } 54 | FL_EXPORT_C(void,Fl_PNM_Image_draw_with_cy)(fl_PNM_Image image,int X,int Y,int W,int H,int cy){ 55 | return (static_cast(image))->draw(X,Y,W,H,0,cy); 56 | } 57 | FL_EXPORT_C(void,Fl_PNM_Image_draw)(fl_PNM_Image image,int X,int Y){ 58 | return (static_cast(image))->draw(X,Y); 59 | } 60 | FL_EXPORT_C(void,Fl_PNM_Image_uncache)(fl_PNM_Image image){ 61 | return (static_cast(image))->uncache(); 62 | } 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | -------------------------------------------------------------------------------- /src/Fl_PNM_ImageC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_IMAGE_C__ 2 | #define __FL_IMAGE_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_PNM_Image.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | FL_EXPORT_C(fl_PNM_Image, Fl_PNM_Image_New)(const char* filename); 13 | FL_EXPORT_C(void, Fl_PNM_Image_Destroy)(fl_PNM_Image image); 14 | FL_EXPORT_C(int, Fl_PNM_Image_w)(fl_PNM_Image image); 15 | FL_EXPORT_C(int, Fl_PNM_Image_h)(fl_PNM_Image image); 16 | FL_EXPORT_C(int, Fl_PNM_Image_d)(fl_PNM_Image image); 17 | FL_EXPORT_C(int, Fl_PNM_Image_ld)(fl_PNM_Image image); 18 | FL_EXPORT_C(int, Fl_PNM_Image_count)(fl_PNM_Image image); 19 | FL_EXPORT_C(fl_PNM_Image, Fl_PNM_Image_copy_with_w_h)(fl_PNM_Image image,int W, int H); 20 | FL_EXPORT_C(fl_PNM_Image, Fl_PNM_Image_copy)(fl_PNM_Image image); 21 | FL_EXPORT_C(void, Fl_PNM_Image_color_average)(fl_PNM_Image image,Fl_Color c, float i); 22 | FL_EXPORT_C(void, Fl_PNM_Image_inactive)(fl_PNM_Image image); 23 | FL_EXPORT_C(void, Fl_PNM_Image_desaturate)(fl_PNM_Image image); 24 | FL_EXPORT_C(void, Fl_PNM_Image_label)(fl_PNM_Image image,fl_Widget w); 25 | FL_EXPORT_C(void, Fl_PNM_Image_label_with_menu_item)(fl_PNM_Image image,fl_Menu_Item m); 26 | FL_EXPORT_C(void, Fl_PNM_Image_draw_with_cx_cy)(fl_PNM_Image image,int X, int Y, int W, int H, int cx, int cy); 27 | FL_EXPORT_C(void, Fl_PNM_Image_draw_with_cx)(fl_PNM_Image image,int X, int Y, int W, int H, int cx); 28 | FL_EXPORT_C(void, Fl_PNM_Image_draw_with_cy)(fl_PNM_Image image,int X, int Y, int W, int H, int cy); 29 | FL_EXPORT_C(void, Fl_PNM_Image_draw)(fl_PNM_Image image,int X, int Y); 30 | FL_EXPORT_C(void, Fl_PNM_Image_uncache)(fl_PNM_Image image); 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* __FL_xxx_C__ */ 35 | -------------------------------------------------------------------------------- /src/Fl_PixmapC.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_PixmapC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(fl_Pixmap, Fl_Pixmap_New)(char** bits){ 6 | Fl_Pixmap* i = new Fl_Pixmap((const char* const *)bits); 7 | return (fl_Pixmap)i; 8 | } 9 | FL_EXPORT_C(fl_Pixmap, Fl_Pixmap_New_With_D)(uchar** bits){ 10 | Fl_Pixmap* i = new Fl_Pixmap((const uchar* const *)bits); 11 | return (fl_Pixmap)i; 12 | } 13 | FL_EXPORT_C(int,Fl_Pixmap_w)(fl_Pixmap pixmap){ 14 | return (static_cast(pixmap))->w(); 15 | } 16 | FL_EXPORT_C(int,Fl_Pixmap_h)(fl_Pixmap pixmap){ 17 | return (static_cast(pixmap))->h(); 18 | } 19 | FL_EXPORT_C(int,Fl_Pixmap_d)(fl_Pixmap pixmap){ 20 | return (static_cast(pixmap))->d(); 21 | } 22 | FL_EXPORT_C(int,Fl_Pixmap_ld)(fl_Pixmap pixmap){ 23 | return (static_cast(pixmap))->ld(); 24 | } 25 | FL_EXPORT_C(int,Fl_Pixmap_count)(fl_Pixmap pixmap){ 26 | return (static_cast(pixmap))->count(); 27 | } 28 | FL_EXPORT_C(fl_Image,Fl_Pixmap_copy_with_w_h)(fl_Pixmap pixmap,int W,int H){ 29 | return (static_cast(pixmap))->copy(W,H); 30 | } 31 | FL_EXPORT_C(fl_Image,Fl_Pixmap_copy)(fl_Pixmap pixmap){ 32 | return (static_cast(pixmap))->copy(); 33 | } 34 | FL_EXPORT_C(void,Fl_Pixmap_color_average)(fl_Pixmap pixmap,Fl_Color c,float i){ 35 | (static_cast(pixmap))->color_average(c,i); 36 | } 37 | FL_EXPORT_C(void,Fl_Pixmap_inactive)(fl_Pixmap pixmap){ 38 | (static_cast(pixmap))->inactive(); 39 | } 40 | FL_EXPORT_C(void,Fl_Pixmap_desaturate)(fl_Pixmap pixmap){ 41 | (static_cast(pixmap))->desaturate(); 42 | } 43 | FL_EXPORT_C(void,Fl_Pixmap_label)(fl_Pixmap pixmap,fl_Widget w){ 44 | (static_cast(pixmap))->label((static_cast(w))); 45 | } 46 | FL_EXPORT_C(void,Fl_Pixmap_label_with_menu_item)(fl_Pixmap pixmap,fl_Menu_Item m){ 47 | (static_cast(pixmap))->label((static_cast(m))); 48 | } 49 | FL_EXPORT_C(void,Fl_Pixmap_draw_with_cx_cy)(fl_Pixmap pixmap,int X,int Y,int W,int H,int cx,int cy){ 50 | (static_cast(pixmap))->draw(X,Y,W,H,cx,cy); 51 | } 52 | FL_EXPORT_C(void,Fl_Pixmap_draw_with_cx)(fl_Pixmap pixmap,int X,int Y,int W,int H,int cx){ 53 | (static_cast(pixmap))->draw(X,Y,W,H,cx); 54 | } 55 | FL_EXPORT_C(void,Fl_Pixmap_draw_with_cy)(fl_Pixmap pixmap,int X,int Y,int W,int H,int cy){ 56 | (static_cast(pixmap))->draw(X,Y,W,H,cy); 57 | } 58 | FL_EXPORT_C(void,Fl_Pixmap_draw)(fl_Pixmap pixmap,int X,int Y){ 59 | (static_cast(pixmap))->draw(X,Y); 60 | } 61 | FL_EXPORT_C(void,Fl_Pixmap_uncache)(fl_Pixmap pixmap){ 62 | (static_cast(pixmap))->uncache(); 63 | } 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | -------------------------------------------------------------------------------- /src/Fl_PixmapC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_PIXMAP_C__ 2 | #define __FL_PIXMAP_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_Pixmap.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | FL_EXPORT_C(fl_Pixmap, Fl_Pixmap_New)(char** bits); 13 | FL_EXPORT_C(fl_Pixmap, Fl_Pixmap_New_With_UChar)(uchar** bits); 14 | FL_EXPORT_C(int, Fl_Pixmap_w)(fl_Pixmap pixmap); 15 | FL_EXPORT_C(int, Fl_Pixmap_h)(fl_Pixmap pixmap); 16 | FL_EXPORT_C(int, Fl_Pixmap_d)(fl_Pixmap pixmap); 17 | FL_EXPORT_C(int, Fl_Pixmap_ld)(fl_Pixmap pixmap); 18 | FL_EXPORT_C(int, Fl_Pixmap_count)(fl_Pixmap pixmap); 19 | FL_EXPORT_C(fl_Image, Fl_Pixmap_copy_with_w_h)(fl_Pixmap pixmap,int W, int H); 20 | FL_EXPORT_C(fl_Image, Fl_Pixmap_copy)(fl_Pixmap pixmap); 21 | FL_EXPORT_C(void, Fl_Pixmap_color_average)(fl_Pixmap pixmap,Fl_Color c, float i); 22 | FL_EXPORT_C(void, Fl_Pixmap_inactive)(fl_Pixmap pixmap); 23 | FL_EXPORT_C(void, Fl_Pixmap_desaturate)(fl_Pixmap pixmap); 24 | FL_EXPORT_C(void, Fl_Pixmap_label)(fl_Pixmap pixmap,fl_Widget w); 25 | FL_EXPORT_C(void, Fl_Pixmap_label_with_menu_item)(fl_Pixmap pixmap,fl_Menu_Item m); 26 | FL_EXPORT_C(void, Fl_Pixmap_draw_with_cx_cy)(fl_Pixmap pixmap,int X, int Y, int W, int H, int cx, int cy); 27 | FL_EXPORT_C(void, Fl_Pixmap_draw_with_cx)(fl_Pixmap pixmap,int X, int Y, int W, int H, int cx); 28 | FL_EXPORT_C(void, Fl_Pixmap_draw_with_cy)(fl_Pixmap pixmap,int X, int Y, int W, int H, int cy); 29 | FL_EXPORT_C(void, Fl_Pixmap_draw)(fl_Pixmap pixmap,int X, int Y); 30 | FL_EXPORT_C(void, Fl_Pixmap_uncache)(fl_Pixmap pixmap); 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | #endif /* __FL_PIXMAP_C__ */ 35 | -------------------------------------------------------------------------------- /src/Fl_PrinterC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_PRINTER_C__ 2 | #define __FL_PRINTER_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_Printer.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | // Inherited from Fl_Surface_Driver 13 | FL_EXPORT_C(const char*, Fl_Printer_class_id)(); 14 | FL_EXPORT_C(const char*, Fl_Printer_class_name)(fl_Printer printer); 15 | FL_EXPORT_C(void, Fl_Printer_set_current)(fl_Printer printer); 16 | FL_EXPORT_C(fl_Graphics_Driver, Fl_Printer_driver)(fl_Printer printer); 17 | FL_EXPORT_C(fl_Surface_Device, Fl_Printer_surface)(); 18 | // Inherited from Fl_Printer 19 | FL_EXPORT_C(int, Fl_Printer_start_job)(fl_Printer printer,int pagecount); 20 | FL_EXPORT_C(int, Fl_Printer_start_job_with_frompage)(fl_Printer printer,int pagecount, int* frompage); 21 | FL_EXPORT_C(int, Fl_Printer_start_job_with_topage)(fl_Printer printer,int pagecount, int* topage); 22 | FL_EXPORT_C(int, Fl_Printer_start_job_with_frompage_topage)(fl_Printer printer,int pagecount, int* frompage, int* topage); 23 | FL_EXPORT_C(int, Fl_Printer_start_page)(fl_Printer printer); 24 | FL_EXPORT_C(int, Fl_Printer_printable_rect)(fl_Printer printer,int* w, int* h); 25 | FL_EXPORT_C(void, Fl_Printer_margins)(fl_Printer printer,int* left, int* top, int* right, int* bottom); 26 | FL_EXPORT_C(void, Fl_Printer_origin)(fl_Printer printer,int* x, int* y); 27 | FL_EXPORT_C(void, Fl_Printer_scale)(fl_Printer printer,float scale_x); 28 | FL_EXPORT_C(void, Fl_Printer_scale_with_scale_y)(fl_Printer printer,float scale_x, float scale_y); 29 | FL_EXPORT_C(void, Fl_Printer_rotate)(fl_Printer printer,float angle); 30 | FL_EXPORT_C(void, Fl_Printer_translate)(fl_Printer printer,int x, int y); 31 | FL_EXPORT_C(void, Fl_Printer_untranslate)(fl_Printer printer); 32 | FL_EXPORT_C(void, Fl_Printer_print_widget)(fl_Printer printer,fl_Widget widget); 33 | FL_EXPORT_C(void, Fl_Printer_print_widget_with_delta_x)(fl_Printer printer,fl_Widget widget, int delta_x); 34 | FL_EXPORT_C(void, Fl_Printer_print_widget_with_delta_y)(fl_Printer printer,fl_Widget widget, int delta_y); 35 | FL_EXPORT_C(void, Fl_Printer_print_widget_with_delta_x_delta_y)(fl_Printer printer,fl_Widget widget, int delta_x, int delta_y); 36 | FL_EXPORT_C(void, Fl_Printer_print_window)(fl_Printer printer,fl_Window win); 37 | FL_EXPORT_C(void, Fl_Printer_print_window_with_x_offset)(fl_Printer printer,fl_Window win, int x_offset); 38 | FL_EXPORT_C(void, Fl_Printer_print_window_with_y_offset)(fl_Printer printer,fl_Window win, int y_offset); 39 | FL_EXPORT_C(void, Fl_Printer_print_window_with_x_offset_y_offset)(fl_Printer printer,fl_Window win, int x_offset, int y_offset); 40 | FL_EXPORT_C(void, Fl_Printer_print_window_part)(fl_Printer printer,fl_Window win, int x, int y, int w, int h); 41 | FL_EXPORT_C(void, Fl_Printer_print_window_part_with_delta_x)(fl_Printer printer,fl_Window win, int x, int y, int w, int h, int delta_x); 42 | FL_EXPORT_C(void, Fl_Printer_print_window_part_with_delta_y)(fl_Printer printer,fl_Window win, int x, int y, int w, int h, int delta_y); 43 | FL_EXPORT_C(void, Fl_Printer_print_window_part_with_delta_xy)(fl_Printer printer,fl_Window win, int x, int y, int w, int h, int delta_x, int delta_y); 44 | FL_EXPORT_C(int, Fl_Printer_end_page)(fl_Printer printer); 45 | FL_EXPORT_C(void, Fl_Printer_end_job)(fl_Printer printer); 46 | FL_EXPORT_C(fl_Printer, Fl_Printer_New)(); 47 | FL_EXPORT_C(void, Fl_Printer_Destroy)(fl_Printer printer); 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif /* __FL_PRINTER_C__ */ 52 | -------------------------------------------------------------------------------- /src/Fl_RGB_ImageC.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_RGB_ImageC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(fl_RGB_Image, Fl_RGB_Image_New)(uchar* bits, int W, int H){ 6 | Fl_RGB_Image* i = new Fl_RGB_Image(bits,W,H); 7 | return (fl_RGB_Image)i; 8 | } 9 | FL_EXPORT_C(fl_RGB_Image, Fl_RGB_Image_New_With_D)(uchar* bits, int W, int H, int D){ 10 | Fl_RGB_Image* i = new Fl_RGB_Image(bits,W,H,D); 11 | return (fl_RGB_Image)i; 12 | } 13 | FL_EXPORT_C(fl_RGB_Image, Fl_RGB_Image_New_With_LD)(uchar* bits, int W, int H, int LD){ 14 | Fl_RGB_Image* i = new Fl_RGB_Image(bits,W,H,0,LD); 15 | return (fl_RGB_Image)i; 16 | } 17 | FL_EXPORT_C(fl_RGB_Image, Fl_RGB_Image_New_With_D_LD)(uchar* bits, int W, int H, int D, int LD){ 18 | Fl_RGB_Image* i = new Fl_RGB_Image(bits,W,H,D,LD); 19 | return (fl_RGB_Image)i; 20 | } 21 | FL_EXPORT_C(int,Fl_RGB_Image_w)(fl_RGB_Image rgb_image){ 22 | return (static_cast(rgb_image))->w(); 23 | } 24 | FL_EXPORT_C(int,Fl_RGB_Image_h)(fl_RGB_Image rgb_image){ 25 | return (static_cast(rgb_image))->h(); 26 | } 27 | FL_EXPORT_C(int,Fl_RGB_Image_d)(fl_RGB_Image rgb_image){ 28 | return (static_cast(rgb_image))->d(); 29 | } 30 | FL_EXPORT_C(int,Fl_RGB_Image_ld)(fl_RGB_Image rgb_image){ 31 | return (static_cast(rgb_image))->ld(); 32 | } 33 | FL_EXPORT_C(int,Fl_RGB_Image_count)(fl_RGB_Image rgb_image){ 34 | return (static_cast(rgb_image))->count(); 35 | } 36 | FL_EXPORT_C(fl_Image,Fl_RGB_Image_copy_with_w_h)(fl_RGB_Image rgb_image,int W,int H){ 37 | return (static_cast(rgb_image))->copy(W,H); 38 | } 39 | FL_EXPORT_C(fl_Image,Fl_RGB_Image_copy)(fl_RGB_Image rgb_image){ 40 | return (static_cast(rgb_image))->copy(); 41 | } 42 | FL_EXPORT_C(void,Fl_RGB_Image_color_average)(fl_RGB_Image rgb_image,Fl_Color c,float i){ 43 | (static_cast(rgb_image))->color_average(c,i); 44 | } 45 | FL_EXPORT_C(void,Fl_RGB_Image_inactive)(fl_RGB_Image rgb_image){ 46 | (static_cast(rgb_image))->inactive(); 47 | } 48 | FL_EXPORT_C(void,Fl_RGB_Image_desaturate)(fl_RGB_Image rgb_image){ 49 | (static_cast(rgb_image))->desaturate(); 50 | } 51 | FL_EXPORT_C(void,Fl_RGB_Image_label)(fl_RGB_Image rgb_image,fl_Widget w){ 52 | (static_cast(rgb_image))->label((static_cast(w))); 53 | } 54 | FL_EXPORT_C(void,Fl_RGB_Image_label_with_menu_item)(fl_RGB_Image rgb_image,fl_Menu_Item m){ 55 | (static_cast(rgb_image))->label((static_cast(m))); 56 | } 57 | FL_EXPORT_C(void,Fl_RGB_Image_draw_with_cx_cy)(fl_RGB_Image rgb_image,int X,int Y,int W,int H,int cx,int cy){ 58 | (static_cast(rgb_image))->draw(X,Y,W,H,cx,cy); 59 | } 60 | FL_EXPORT_C(void,Fl_RGB_Image_draw_with_cx)(fl_RGB_Image rgb_image,int X,int Y,int W,int H,int cx){ 61 | (static_cast(rgb_image))->draw(X,Y,W,H,cx); 62 | } 63 | FL_EXPORT_C(void,Fl_RGB_Image_draw_with_cy)(fl_RGB_Image rgb_image,int X,int Y,int W,int H,int cy){ 64 | (static_cast(rgb_image))->draw(X,Y,W,H,cy); 65 | } 66 | FL_EXPORT_C(void,Fl_RGB_Image_draw)(fl_RGB_Image rgb_image,int X,int Y){ 67 | (static_cast(rgb_image))->draw(X,Y); 68 | } 69 | FL_EXPORT_C(void,Fl_RGB_Image_uncache)(fl_RGB_Image rgb_image){ 70 | (static_cast(rgb_image))->uncache(); 71 | } 72 | FL_EXPORT_C(void,Fl_RGB_Image_set_max_size)(size_t size){ 73 | Fl_RGB_Image::max_size(size); 74 | } 75 | FL_EXPORT_C(size_t,Fl_RGB_Image_max_size)( ){ 76 | return Fl_RGB_Image::max_size(); 77 | } 78 | #ifdef __cplusplus 79 | } 80 | #endif 81 | -------------------------------------------------------------------------------- /src/Fl_RGB_ImageC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_RGB_IMAGE_C__ 2 | #define __FL_RGB_IMAGE_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_Image.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | FL_EXPORT_C(fl_RGB_Image, Fl_RGB_Image_New)(uchar* bits, int W, int H); 13 | FL_EXPORT_C(fl_RGB_Image, Fl_RGB_Image_New_With_D)(uchar* bits, int W, int H, int D); 14 | FL_EXPORT_C(fl_RGB_Image, Fl_RGB_Image_New_With_LD)(uchar* bits, int W, int H, int LD); 15 | FL_EXPORT_C(fl_RGB_Image, Fl_RGB_Image_New_With_D_LD)(uchar* bits, int W, int H, int D, int LD); 16 | FL_EXPORT_C(int, Fl_RGB_Image_w)(fl_RGB_Image rgb_image); 17 | FL_EXPORT_C(int, Fl_RGB_Image_h)(fl_RGB_Image rgb_image); 18 | FL_EXPORT_C(int, Fl_RGB_Image_d)(fl_RGB_Image rgb_image); 19 | FL_EXPORT_C(int, Fl_RGB_Image_ld)(fl_RGB_Image rgb_image); 20 | FL_EXPORT_C(int, Fl_RGB_Image_count)(fl_RGB_Image rgb_image); 21 | FL_EXPORT_C(fl_Image, Fl_RGB_Image_copy_with_w_h)(fl_RGB_Image rgb_image,int W, int H); 22 | FL_EXPORT_C(fl_Image, Fl_RGB_Image_copy)(fl_RGB_Image rgb_image); 23 | FL_EXPORT_C(void, Fl_RGB_Image_color_average)(fl_RGB_Image rgb_image,Fl_Color c, float i); 24 | FL_EXPORT_C(void, Fl_RGB_Image_inactive)(fl_RGB_Image rgb_image); 25 | FL_EXPORT_C(void, Fl_RGB_Image_desaturate)(fl_RGB_Image rgb_image); 26 | FL_EXPORT_C(void, Fl_RGB_Image_label)(fl_RGB_Image rgb_image,fl_Widget w); 27 | FL_EXPORT_C(void, Fl_RGB_Image_label_with_menu_item)(fl_RGB_Image rgb_image,fl_Menu_Item m); 28 | FL_EXPORT_C(void, Fl_RGB_Image_draw_with_cx_cy)(fl_RGB_Image rgb_image,int X, int Y, int W, int H, int cx, int cy); 29 | FL_EXPORT_C(void, Fl_RGB_Image_draw_with_cx)(fl_RGB_Image rgb_image,int X, int Y, int W, int H, int cx); 30 | FL_EXPORT_C(void, Fl_RGB_Image_draw_with_cy)(fl_RGB_Image rgb_image,int X, int Y, int W, int H, int cy); 31 | FL_EXPORT_C(void, Fl_RGB_Image_draw)(fl_RGB_Image rgb_image,int X, int Y); 32 | FL_EXPORT_C(void, Fl_RGB_Image_uncache)(fl_RGB_Image rgb_image); 33 | FL_EXPORT_C(void, Fl_RGB_Image_set_max_size)(size_t size); 34 | FL_EXPORT_C(size_t, Fl_RGB_Image_max_size)(); 35 | #ifdef __cplusplus 36 | } 37 | #endif 38 | #endif /* __FL_RGB_IMAGE_C__ */ 39 | -------------------------------------------------------------------------------- /src/Fl_Shared_ImageC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_SHARED_IMAGE_C__ 2 | #define __FL_SHARED_IMAGE_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "DerivedShared_Image.h" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | FL_EXPORT_C(int, Fl_Shared_Image_w)(fl_Shared_Image shared_image); 13 | FL_EXPORT_C(int, Fl_Shared_Image_h)(fl_Shared_Image shared_image); 14 | FL_EXPORT_C(int, Fl_Shared_Image_d)(fl_Shared_Image shared_image); 15 | FL_EXPORT_C(int, Fl_Shared_Image_ld)(fl_Shared_Image shared_image); 16 | FL_EXPORT_C(int, Fl_Shared_Image_count)(fl_Shared_Image shared_image); 17 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_copy_with_w_h)(fl_Shared_Image shared_image,int W, int H); 18 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_copy)(fl_Shared_Image shared_image); 19 | FL_EXPORT_C(void, Fl_Shared_Image_color_average)(fl_Shared_Image shared_image,Fl_Color c, float i); 20 | FL_EXPORT_C(void, Fl_Shared_Image_inactive)(fl_Shared_Image shared_image); 21 | FL_EXPORT_C(void, Fl_Shared_Image_desaturate)(fl_Shared_Image shared_image); 22 | FL_EXPORT_C(void, Fl_Shared_Image_label)(fl_Shared_Image shared_image,fl_Widget w); 23 | FL_EXPORT_C(void, Fl_Shared_Image_label_with_menu_item)(fl_Shared_Image shared_image,fl_Menu_Item m); 24 | FL_EXPORT_C(void, Fl_Shared_Image_uncache)(fl_Shared_Image shared_image); 25 | FL_EXPORT_C(const char*, Fl_Shared_Image_name)(fl_Shared_Image shared_image); 26 | FL_EXPORT_C(int, Fl_Shared_Image_refcount)(fl_Shared_Image shared_image); 27 | FL_EXPORT_C(void, Fl_Shared_Image_release)(fl_Shared_Image shared_image); 28 | FL_EXPORT_C(void, Fl_Shared_Image_reload)(fl_Shared_Image shared_image); 29 | FL_EXPORT_C(fl_Image, Fl_Shared_Image_copy_with_WH)(fl_Shared_Image shared_image,int W, int H); 30 | FL_EXPORT_C(fl_Image, Fl_Shared_Image_copy)(fl_Shared_Image shared_image); 31 | FL_EXPORT_C(void, Fl_Shared_Image_color_average)(fl_Shared_Image shared_image,Fl_Color c, float i); 32 | FL_EXPORT_C(void, Fl_Shared_Image_desaturate)(fl_Shared_Image shared_image); 33 | FL_EXPORT_C(void, Fl_Shared_Image_draw_with_XYWHcxcy)(fl_Shared_Image shared_image,int X, int Y, int W, int H, int cx, int cy); 34 | FL_EXPORT_C(void, Fl_Shared_Image_draw)(fl_Shared_Image shared_image,int X, int Y); 35 | FL_EXPORT_C(void, Fl_Shared_Image_uncache)(fl_Shared_Image shared_image); 36 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_find)(const char* n); 37 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_find_W)(const char* n, int H); 38 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_find_H)(const char* n, int H); /* int W = 0, */ 39 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_find_WH)(const char* n, int W, int H); 40 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_get)(const char* n); 41 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_get_W)(const char* n, int H); 42 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_get_H)(const char* n, int H); 43 | FL_EXPORT_C(fl_Shared_Image, Fl_Shared_Image_get_WH)(const char* n, int W, int H); 44 | FL_EXPORT_C(fl_Shared_Image*, Fl_Shared_Image_images)(); 45 | FL_EXPORT_C(int, Fl_Shared_Image_num_images)(); 46 | FL_EXPORT_C(void, Fl_Shared_Image_add_handler)(fl_Shared_Image_Handler f); 47 | FL_EXPORT_C(void, Fl_Shared_Image_remove_handler)(fl_Shared_Image_Handler f); 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif /* __FL_SHARED_IMAGE_C__ */ 52 | -------------------------------------------------------------------------------- /src/Fl_Text_SelectionC.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_Text_SelectionC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(void,Fl_Text_Selection_set)(fl_Text_Selection text_selection,int start,int end){ 6 | (static_cast(text_selection))->set(start,end); 7 | } 8 | FL_EXPORT_C(void,Fl_Text_Selection_update)(fl_Text_Selection text_selection,int pos,int nDeleted,int nInserted){ 9 | (static_cast(text_selection))->update(pos,nDeleted,nInserted); 10 | } 11 | FL_EXPORT_C(int,Fl_Text_Selection_start)(fl_Text_Selection text_selection){ 12 | return (static_cast(text_selection))->start(); 13 | } 14 | FL_EXPORT_C(int,Fl_Text_Selection_end)(fl_Text_Selection text_selection){ 15 | return (static_cast(text_selection))->end(); 16 | } 17 | FL_EXPORT_C(bool,Fl_Text_Selection_selected)(fl_Text_Selection text_selection){ 18 | return (static_cast(text_selection))->selected(); 19 | } 20 | FL_EXPORT_C(void,Fl_Text_Selection_set_selected)(fl_Text_Selection text_selection,bool b){ 21 | (static_cast(text_selection))->selected(b); 22 | } 23 | FL_EXPORT_C(int,Fl_Text_Selection_includes)(fl_Text_Selection text_selection,int pos){ 24 | return (static_cast(text_selection))->includes(pos); 25 | } 26 | FL_EXPORT_C(int,Fl_Text_Selection_position)(fl_Text_Selection text_selection,int* start,int* end){ 27 | return (static_cast(text_selection))->position(start,end); 28 | } 29 | FL_EXPORT_C(fl_Text_Selection, Fl_Text_Selection_New)(){ 30 | Fl_Text_Selection* t = new Fl_Text_Selection(); 31 | return (fl_Text_Selection)t; 32 | } 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /src/Fl_Text_SelectionC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_TEXT_SELECTION_C__ 2 | #define __FL_TEXT_SELECTION_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_Text_Buffer.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | FL_EXPORT_C(void, Fl_Text_Selection_set)(fl_Text_Selection text_selection,int start, int end); 13 | FL_EXPORT_C(void, Fl_Text_Selection_update)(fl_Text_Selection text_selection, int pos, int nDeleted, int nInserted); 14 | FL_EXPORT_C(int, Fl_Text_Selection_start)(fl_Text_Selection text_selection); 15 | FL_EXPORT_C(int, Fl_Text_Selection_end)(fl_Text_Selection text_selection); 16 | FL_EXPORT_C(bool, Fl_Text_Selection_selected)(fl_Text_Selection text_selection); 17 | FL_EXPORT_C(void, Fl_Text_Selection_set_selected)(fl_Text_Selection text_selection, bool b); 18 | FL_EXPORT_C(int, Fl_Text_Selection_includes)(fl_Text_Selection text_selection, int pos); 19 | FL_EXPORT_C(int, Fl_Text_Selection_position)(fl_Text_Selection text_selection, int* start, int* end); 20 | #ifdef __cplusplus 21 | } 22 | #endif 23 | #endif /*#ifndef __FL_TEXT_SELECTION_C__*/ 24 | -------------------------------------------------------------------------------- /src/Fl_TooltipC.cpp: -------------------------------------------------------------------------------- 1 | #include "Fl_TooltipC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(float,Fl_Tooltip_delay)( ){ 6 | return Fl_Tooltip::delay(); 7 | } 8 | FL_EXPORT_C(void,Fl_Tooltip_set_delay)(float f){ 9 | Fl_Tooltip::delay(f); 10 | } 11 | FL_EXPORT_C(float,Fl_Tooltip_hoverdelay)( ){ 12 | return Fl_Tooltip::hoverdelay(); 13 | } 14 | FL_EXPORT_C(void,Fl_Tooltip_set_hoverdelay)(float f){ 15 | Fl_Tooltip::hoverdelay(f); 16 | } 17 | FL_EXPORT_C(void,Fl_Tooltip_enable)( ){ 18 | Fl_Tooltip::enable(); 19 | } 20 | FL_EXPORT_C(void,Fl_Tooltip_enable_with_b)(int b){ 21 | Fl_Tooltip::enable(b); 22 | } 23 | FL_EXPORT_C(void,Fl_Tooltip_disable)( ){ 24 | Fl_Tooltip::disable(); 25 | } 26 | FL_EXPORT_C(void,Fl_Tooltip_enter_area)(fl_Widget w,int X,int Y,int W,int H,const char* tip){ 27 | Fl_Tooltip::enter_area((static_cast(w)),X,Y,W,H,tip); 28 | } 29 | FL_EXPORT_C(fl_Widget,Fl_Tooltip_current)( ){ 30 | return (fl_Widget)Fl_Tooltip::current(); 31 | } 32 | FL_EXPORT_C(void,Fl_Tooltip_set_current)(fl_Widget w){ 33 | Fl_Tooltip::current((static_cast(w))); 34 | } 35 | FL_EXPORT_C(Fl_Font,Fl_Tooltip_font)( ){ 36 | return Fl_Tooltip::font(); 37 | } 38 | FL_EXPORT_C(void,Fl_Tooltip_set_font)(Fl_Font i){ 39 | Fl_Tooltip::font(i); 40 | } 41 | FL_EXPORT_C(Fl_Fontsize,Fl_Tooltip_size)( ){ 42 | return Fl_Tooltip::size(); 43 | } 44 | FL_EXPORT_C(void,Fl_Tooltip_set_size)(Fl_Fontsize s){ 45 | Fl_Tooltip::size(s); 46 | } 47 | FL_EXPORT_C(Fl_Color,Fl_Tooltip_color)( ){ 48 | return Fl_Tooltip::color(); 49 | } 50 | FL_EXPORT_C(void,Fl_Tooltip_set_color)(Fl_Color c){ 51 | Fl_Tooltip::color(c); 52 | } 53 | FL_EXPORT_C(Fl_Color,Fl_Tooltip_textcolor)( ){ 54 | return Fl_Tooltip::textcolor(); 55 | } 56 | FL_EXPORT_C(void,Fl_Tooltip_set_textcolor)(Fl_Color c){ 57 | Fl_Tooltip::textcolor(c); 58 | } 59 | #if FLTK_ABI_VERSION >= 10301 60 | FL_EXPORT_C(int,Fl_Tooltip_margin_width)( ){ 61 | return Fl_Tooltip::margin_width(); 62 | } 63 | FL_EXPORT_C(void,Fl_Tooltip_set_margin_width)(int v){ 64 | Fl_Tooltip::margin_width(v); 65 | } 66 | FL_EXPORT_C(int,Fl_Tooltip_margin_height)( ){ 67 | return Fl_Tooltip::margin_height(); 68 | } 69 | FL_EXPORT_C(void,Fl_Tooltip_set_margin_height)(int v){ 70 | Fl_Tooltip::margin_height(v); 71 | } 72 | FL_EXPORT_C(int,Fl_Tooltip_wrap_width)( ){ 73 | return Fl_Tooltip::wrap_width(); 74 | } 75 | FL_EXPORT_C(void,Fl_Tooltip_set_wrap_width)(int v){ 76 | Fl_Tooltip::wrap_width(v); 77 | } 78 | #else 79 | FL_EXPORT_C(int,Fl_Tooltip_margin_width)( ){ 80 | return Fl_Tooltip::margin_width(); 81 | } 82 | FL_EXPORT_C(int,Fl_Tooltip_margin_height)( ){ 83 | return Fl_Tooltip::margin_height(); 84 | } 85 | FL_EXPORT_C(int,Fl_Tooltip_wrap_width)( ){ 86 | return Fl_Tooltip::wrap_width(); 87 | } 88 | #endif 89 | #ifdef __APPLE__ 90 | FL_EXPORT_C(fl_Window,Fl_Tooltip_current_window)(void ){ 91 | return (fl_Window)Fl_Tooltip::current_window(); 92 | } 93 | #endif 94 | #ifdef __cplusplus 95 | } 96 | #endif 97 | -------------------------------------------------------------------------------- /src/Fl_TooltipC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FL_TOOLTIP_C__ 2 | #define __FL_TOOLTIP_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/Fl_Tooltip.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | FL_EXPORT_C(float, Fl_Tooltip_delay)(); 13 | FL_EXPORT_C(void, Fl_Tooltip_set_delay)(float f); 14 | FL_EXPORT_C(float, Fl_Tooltip_hoverdelay)(); 15 | FL_EXPORT_C(void, Fl_Tooltip_set_hoverdelay)(float f); 16 | FL_EXPORT_C(int, Fl_Tooltip_enabled)(); 17 | FL_EXPORT_C(void, Fl_Tooltip_enable)(); 18 | FL_EXPORT_C(void, Fl_Tooltip_enable_with_b)(int b); 19 | FL_EXPORT_C(void, Fl_Tooltip_disable)(); 20 | typedef void (*fl_enter)(fl_Widget w); 21 | FL_EXPORT_C(void, Fl_Tooltip_enter_area)(fl_Widget w, int X, int Y, int W, int H, const char* tip); 22 | typedef void (*fl_exit)(fl_Widget w); 23 | FL_EXPORT_C(fl_Widget, Fl_Tooltip_current)(); 24 | FL_EXPORT_C(void, Fl_Tooltip_set_current)(fl_Widget w); 25 | FL_EXPORT_C(Fl_Font, Fl_Tooltip_font)(); 26 | FL_EXPORT_C(void, Fl_Tooltip_set_font)(Fl_Font i); 27 | FL_EXPORT_C(Fl_Fontsize, Fl_Tooltip_size)(); 28 | FL_EXPORT_C(void, Fl_Tooltip_set_size)(Fl_Fontsize s); 29 | FL_EXPORT_C(Fl_Color, Fl_Tooltip_color)(); 30 | FL_EXPORT_C(void, Fl_Tooltip_set_color)(Fl_Color c); 31 | FL_EXPORT_C(Fl_Color, Fl_Tooltip_textcolor)(); 32 | FL_EXPORT_C(void, Fl_Tooltip_set_textcolor)(Fl_Color c); 33 | #if FLTK_ABI_VERSION >= 10301 34 | FL_EXPORT_C(int, Fl_Tooltip_margin_width)(); 35 | FL_EXPORT_C(void, Fl_Tooltip_set_margin_width)(int v); 36 | FL_EXPORT_C(int, Fl_Tooltip_margin_height)(); 37 | FL_EXPORT_C(void, Fl_Tooltip_set_margin_height)(int v); 38 | FL_EXPORT_C(int, Fl_Tooltip_wrap_width)(); 39 | FL_EXPORT_C(void, Fl_Tooltip_set_wrap_width)(int v); 40 | #else 41 | FL_EXPORT_C(int, Fl_Tooltip_margin_width)(); 42 | FL_EXPORT_C(int, Fl_Tooltip_margin_height)(); 43 | FL_EXPORT_C(int, Fl_Tooltip_wrap_width)(); 44 | #endif 45 | #ifdef __APPLE__ 46 | FL_EXPORT_C(fl_Window, Fl_Tooltip_current_window)(void); 47 | #endif 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | #endif /* __FL_TOOLTIP_C__ */ 52 | -------------------------------------------------------------------------------- /src/Makefile.in: -------------------------------------------------------------------------------- 1 | FLTKCONFIG=@FLTKCONFIG@ 2 | CXX = $(shell $(FLTKCONFIG) --cxx) $(shell $(FLTKCONFIG) --cxxflags) -Wall -Werror -DINTERNAL_LINKAGE -g -Icpp -I../ 3 | LD = $(CXX) -shared 4 | CXXSTATIC = $(CXX) -static 5 | 6 | CPPFILES= \ 7 | xC.cpp \ 8 | glC.cpp \ 9 | glutC.cpp \ 10 | DerivedText_Editor.cpp \ 11 | DerivedShared_Image.cpp \ 12 | filenameC.cpp \ 13 | Fl_AskC.cpp \ 14 | Fl_BitmapC.cpp \ 15 | Fl_BoxC.cpp \ 16 | Fl_BrowserC.cpp \ 17 | Fl_ButtonC.cpp \ 18 | Fl_CallbackC.cpp \ 19 | Fl_C.cpp \ 20 | Fl_Check_ButtonC.cpp \ 21 | Fl_ChoiceC.cpp \ 22 | Fl_ClockC.cpp \ 23 | Fl_Color_ChooserC.cpp \ 24 | Fl_Double_WindowC.cpp \ 25 | Fl_DrawC.cpp \ 26 | Fl_DeviceC.cpp \ 27 | Fl_EnumerationsC.cpp \ 28 | Fl_File_BrowserC.cpp \ 29 | Fl_File_IconC.cpp \ 30 | Fl_File_InputC.cpp \ 31 | Fl_File_ChooserC.cpp \ 32 | Fl_Float_InputC.cpp \ 33 | Fl_Gl_WindowC.cpp \ 34 | Fl_GroupC.cpp \ 35 | Fl_Hold_BrowserC.cpp \ 36 | Fl_Hor_Value_SliderC.cpp \ 37 | Fl_Hor_SliderC.cpp \ 38 | Fl_ImageC.cpp \ 39 | Fl_Input_C.cpp \ 40 | Fl_InputC.cpp \ 41 | Fl_Int_InputC.cpp \ 42 | Fl_Light_ButtonC.cpp \ 43 | Fl_Menu_BarC.cpp \ 44 | Fl_Menu_C.cpp \ 45 | Fl_Menu_ItemC.cpp \ 46 | Fl_Multi_BrowserC.cpp \ 47 | Fl_Multiline_InputC.cpp \ 48 | Fl_Multiline_OutputC.cpp \ 49 | Fl_Native_File_ChooserC.cpp \ 50 | Fl_OutputC.cpp \ 51 | Fl_Overlay_WindowC.cpp \ 52 | Fl_Paged_DeviceC.cpp \ 53 | Fl_PixmapC.cpp \ 54 | Fl_PNM_ImageC.cpp \ 55 | Fl_PreferencesC.cpp \ 56 | Fl_PrinterC.cpp \ 57 | Fl_ProgressC.cpp \ 58 | Fl_Radio_ButtonC.cpp \ 59 | Fl_Radio_Light_ButtonC.cpp \ 60 | Fl_Repeat_ButtonC.cpp \ 61 | Fl_Return_ButtonC.cpp \ 62 | Fl_RGB_ImageC.cpp \ 63 | Fl_Round_ButtonC.cpp \ 64 | Fl_Round_ClockC.cpp \ 65 | Fl_Secret_InputC.cpp \ 66 | Fl_Select_BrowserC.cpp \ 67 | Fl_Shared_ImageC.cpp \ 68 | fl_show_colormapC.cpp \ 69 | Fl_Single_WindowC.cpp \ 70 | Fl_SliderC.cpp \ 71 | Fl_Sys_Menu_BarC.cpp \ 72 | Fl_TableC.cpp \ 73 | Fl_Table_RowC.cpp \ 74 | Fl_TabsC.cpp \ 75 | Fl_Text_BufferC.cpp \ 76 | Fl_Text_DisplayC.cpp \ 77 | Fl_Text_EditorC.cpp \ 78 | Fl_Text_SelectionC.cpp \ 79 | Fl_TileC.cpp \ 80 | Fl_Toggle_ButtonC.cpp \ 81 | Fl_TooltipC.cpp \ 82 | Fl_TreeC.cpp \ 83 | Fl_Tree_ItemC.cpp \ 84 | Fl_Tree_PrefsC.cpp \ 85 | Fl_ValuatorC.cpp \ 86 | Fl_Value_InputC.cpp \ 87 | Fl_Value_SliderC.cpp \ 88 | Fl_WidgetC.cpp \ 89 | Fl_WindowC.cpp \ 90 | Fl_WizardC.cpp 91 | 92 | OBJECTS = $(CPPFILES:.cpp=.o) 93 | LIBDIR = ../lib 94 | OBJECT_FILES = ../object_files 95 | .SILENT: 96 | all: libfltkc.a 97 | .SUFFIXES: .cpp .o 98 | .cpp.o: 99 | test -d $(OBJECT_FILES) || mkdir $(OBJECT_FILES) 100 | @echo "*** Compiling $<..." 101 | $(CXXSTATIC) -c $^ -o $(OBJECT_FILES)/$@ -lfltk -lfltk_images -lfltk_gl 102 | libfltkc.a : $(OBJECTS) 103 | test -d $(LIBDIR) || mkdir $(LIBDIR) 104 | @echo "*** Linking $@..." 105 | (cd $(OBJECT_FILES); \ 106 | ar rcs $(LIBDIR)/$@ $^;) 107 | clean: 108 | test -d $(LIBDIR) && rm -rf $(LIBDIR) 109 | test -d $(OBJECT_FILES) && rm -rf $(OBJECT_FILES) 110 | -------------------------------------------------------------------------------- /src/filenameC.cpp: -------------------------------------------------------------------------------- 1 | #include "filenameC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(int,flc_filename_list)(const char *d,struct dirent ***l){ 6 | return fl_filename_list(d,l); 7 | } 8 | FL_EXPORT_C(int,flc_filename_list_with_s)(const char *d,struct dirent ***l,Fl_File_Sort_F *s){ 9 | return fl_filename_list(d,l,s); 10 | } 11 | FL_EXPORT_C(void,flc_filename_free_list)(struct dirent ***l,int n){ 12 | fl_filename_free_list(l,n); 13 | } 14 | FL_EXPORT_C(int,flc_open_uri_with_msg_msglen)(const char *uri,char *msg,int msglen){ 15 | return fl_open_uri(uri,msg,msglen); 16 | } 17 | FL_EXPORT_C(int,flc_open_uri_with_msglen)(const char *uri,int msglen){ 18 | return fl_open_uri(uri,0,msglen); 19 | } 20 | FL_EXPORT_C(int,flc_open_uri_with_msg)(const char *uri,char *msg){ 21 | return fl_open_uri(uri,msg,0); 22 | } 23 | FL_EXPORT_C(int,flc_open_uri)(const char *uri){ 24 | return fl_open_uri(uri); 25 | } 26 | FL_EXPORT_C(void,flc_decode_uri)(char *uri){ 27 | fl_decode_uri(uri); 28 | } 29 | FL_EXPORT_C(const char*,flc_filename_name)(const char* filename){ 30 | return fl_filename_name(filename); 31 | } 32 | FL_EXPORT_C(const char*,flc_filename_ext)(const char* buf){ 33 | return fl_filename_ext(buf); 34 | } 35 | FL_EXPORT_C(char*,flc_filename_setext)(char* to,int tolen,const char* ext){ 36 | return fl_filename_setext(to,tolen,ext); 37 | } 38 | FL_EXPORT_C(int,flc_filename_expand)(char* to,int tolen,const char* from){ 39 | return fl_filename_expand(to,tolen,from); 40 | } 41 | FL_EXPORT_C(int,flc_filename_absolute)(char* to,int tolen,const char* from){ 42 | return fl_filename_absolute(to,tolen,from); 43 | } 44 | FL_EXPORT_C(int,flc_filename_relative)(char* to,int tolen,const char* from){ 45 | return fl_filename_relative(to,tolen,from); 46 | } 47 | FL_EXPORT_C(int,flc_filename_match)(const char* name,const char* pattern){ 48 | return fl_filename_match(name,pattern); 49 | } 50 | FL_EXPORT_C(int,flc_filename_isdir)(const char* name){ 51 | return fl_filename_isdir(name); 52 | } 53 | FL_EXPORT_C(int,flc_filename_relative_with_cwd)(char* to,int tolen,const char* from,const char* cwd){ 54 | return fl_filename_relative(to,tolen,from,cwd); 55 | } 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | -------------------------------------------------------------------------------- /src/filenameC.h: -------------------------------------------------------------------------------- 1 | #ifndef __FILENAME_C__ 2 | #define __FILENAME_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/filename.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #else 12 | #include 13 | #include "FL/filename.H" 14 | #endif 15 | FL_EXPORT_C(int, flc_filename_list)(const char *d, struct dirent ***l); 16 | FL_EXPORT_C(int, flc_filename_list_with_s)(const char *d, struct dirent ***l, Fl_File_Sort_F *s); 17 | FL_EXPORT_C(void,flc_filename_free_list)(struct dirent ***l, int n); 18 | FL_EXPORT_C(int, flc_open_uri_with_msg_msglen)(const char *uri,char *msg ,int msglen); 19 | FL_EXPORT_C(int, flc_open_uri_with_msglen)(const char *uri,int msglen); 20 | FL_EXPORT_C(int, flc_open_uri_with_msg)(const char *uri, char *msg); 21 | FL_EXPORT_C(int, flc_open_uri)(const char *uri); 22 | FL_EXPORT_C(void, flc_decode_uri)(char *uri); 23 | FL_EXPORT_C(const char* ,flc_filename_name)(const char* filename); 24 | FL_EXPORT_C(const char* ,flc_filename_ext)(const char* buf); 25 | FL_EXPORT_C(char* ,flc_filename_setext)(char* to, int tolen, const char* ext); 26 | FL_EXPORT_C(int ,flc_filename_expand)(char* to, int tolen, const char* from); 27 | FL_EXPORT_C(int ,flc_filename_absolute)(char* to, int tolen, const char* from); 28 | FL_EXPORT_C(int ,flc_filename_relative)(char* to, int tolen, const char* from); 29 | FL_EXPORT_C(int ,flc_filename_match)(const char* name, const char* pattern); 30 | FL_EXPORT_C(int ,flc_filename_isdir)(const char* name); 31 | FL_EXPORT_C(int ,flc_filename_relative_with_cwd)(char* to, int tolen, const char* from, const char* cwd); 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | #endif /* __FILENAME_C__ */ 36 | -------------------------------------------------------------------------------- /src/fl_show_colormapC.cpp: -------------------------------------------------------------------------------- 1 | #include "fl_show_colormapC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(Fl_Color, flc_show_colormap)(Fl_Color oldcol){ 6 | return fl_show_colormap(oldcol); 7 | } 8 | #ifdef __cplusplus 9 | } 10 | #endif 11 | -------------------------------------------------------------------------------- /src/fl_show_colormapC.h: -------------------------------------------------------------------------------- 1 | #ifndef fl_show_colormapC_H 2 | #define fl_show_colormapC_H 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/fl_show_colormap.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | FL_EXPORT_C(Fl_Color, flc_show_colormap)(Fl_Color oldcol); 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /src/glC.cpp: -------------------------------------------------------------------------------- 1 | #include "glC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(void,flc_gl_start)( ){ 6 | gl_start(); 7 | } 8 | FL_EXPORT_C(void,flc_gl_finish)( ){ 9 | gl_finish(); 10 | } 11 | FL_EXPORT_C(void,flc_gl_color)(Fl_Color i){ 12 | gl_color(i); 13 | } 14 | FL_EXPORT_C(void,flc_gl_color_with_i)(int c){ 15 | gl_color(c); 16 | } 17 | FL_EXPORT_C(void,flc_gl_rect)(int x,int y,int w,int h){ 18 | gl_rect(x,y,w,h); 19 | } 20 | FL_EXPORT_C(void,flc_gl_rectf)(int x,int y,int w,int h){ 21 | gl_rectf(x,y,w,h); 22 | } 23 | FL_EXPORT_C(void,flc_gl_font)(int fontid,int size){ 24 | gl_font(fontid,size); 25 | } 26 | FL_EXPORT_C(int,flc_gl_height)( ){ 27 | return gl_height(); 28 | } 29 | FL_EXPORT_C(int,flc_gl_descent)( ){ 30 | return gl_descent(); 31 | } 32 | FL_EXPORT_C(double,flc_gl_width)(const char* str){ 33 | return gl_width(str); 34 | } 35 | FL_EXPORT_C(double,flc_gl_width_with_n)(const char* str,int n){ 36 | return gl_width(str,n); 37 | } 38 | FL_EXPORT_C(double,flc_gl_width_with_uchar_str)(uchar str){ 39 | return gl_width(str); 40 | } 41 | FL_EXPORT_C(void,flc_gl_draw)(const char* str){ 42 | gl_draw(str); 43 | } 44 | FL_EXPORT_C(void,flc_gl_draw_with_n)(const char* str,int n){ 45 | gl_draw(str,n); 46 | } 47 | FL_EXPORT_C(void,flc_gl_draw_with_xy)(const char* str,float x,float y){ 48 | gl_draw(str,x,y); 49 | } 50 | FL_EXPORT_C(void,flc_gl_draw_with_nxy)(const char* str,int n,float x,float y){ 51 | gl_draw(str,n,x,y); 52 | } 53 | FL_EXPORT_C(void,flc_gl_draw_with_xywh_align)(const char* str,int x,int y,int w,int h,Fl_Align align){ 54 | gl_draw(str,x,y,w,h,align); 55 | } 56 | FL_EXPORT_C(void,flc_gl_measure)(const char* str,int x,int y){ 57 | gl_measure(str,x,y); 58 | } 59 | #ifdef __APPLE__ 60 | FL_EXPORT_C(void,flc_gl_texture_pile_height)(int max){ 61 | gl_texture_pile_height(max); 62 | } 63 | FL_EXPORT_C(int,flc_gl_texture_pile_height)( ){ 64 | return gl_texture_pile_height(); 65 | } 66 | #endif 67 | FL_EXPORT_C(void,flc_gl_draw_image)(const uchar* str,int x,int y,int w,int h){ 68 | gl_draw_image(str,x,y,w,h); 69 | } 70 | FL_EXPORT_C(void,flc_gl_draw_image_with_d)(const uchar* str,int x,int y,int w,int h,int d){ 71 | gl_draw_image(str,x,y,w,h,d); 72 | } 73 | FL_EXPORT_C(void,flc_gl_draw_image_with_d_ld)(const uchar* str,int x,int y,int w,int h,int ld){ 74 | gl_draw_image(str,x,y,w,h,3,ld); 75 | } 76 | FL_EXPORT_C(void,flc_gl_draw_image_with_ld)(const uchar* str,int x,int y,int w,int h,int d,int ld){ 77 | gl_draw_image(str,x,y,w,h,d,ld); 78 | } 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | 83 | -------------------------------------------------------------------------------- /src/glC.h: -------------------------------------------------------------------------------- 1 | #ifndef __GL_C__ 2 | #define __GL_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // Fl_Widget is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/gl.h" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | # ifdef __APPLE__ 13 | # include 14 | # else 15 | # include 16 | # endif 17 | FL_EXPORT_C(void, flc_gl_start)(); 18 | FL_EXPORT_C(void, flc_gl_finish)(); 19 | FL_EXPORT_C(void, flc_gl_color)(Fl_Color i); 20 | FL_EXPORT_C(void, flc_gl_color_with_i)(int c); 21 | FL_EXPORT_C(void, flc_gl_rect)(int x,int y,int w,int h); 22 | FL_EXPORT_C(void, flc_gl_rectf)(int x,int y,int w,int h); 23 | FL_EXPORT_C(void, flc_gl_font)(int fontid, int size); 24 | FL_EXPORT_C(int, flc_gl_height)(); 25 | FL_EXPORT_C(int, flc_gl_descent)(); 26 | FL_EXPORT_C(double, flc_gl_width)(const char* str); 27 | FL_EXPORT_C(double, flc_gl_width_with_n)(const char* str, int n); 28 | FL_EXPORT_C(double, flc_gl_width_with_uchar_str)(uchar str); 29 | FL_EXPORT_C(void, flc_gl_draw)(const char* str); 30 | FL_EXPORT_C(void, flc_gl_draw_with_n)(const char* str, int n); 31 | FL_EXPORT_C(void, flc_gl_draw_with_xy)(const char* str, float x, float y); 32 | FL_EXPORT_C(void, flc_gl_draw_with_nxy)(const char* str, int n, float x, float y); 33 | FL_EXPORT_C(void, flc_gl_draw_with_xywh_align)(const char* str, int x, int y, int w, int h, Fl_Align align); 34 | FL_EXPORT_C(void, flc_gl_measure)(const char* str, int x, int y); 35 | #ifdef __APPLE__ 36 | FL_EXPORT_C(void, flc_gl_texture_pile_height)(int max); 37 | FL_EXPORT_C(int, flc_gl_texture_pile_height)(); 38 | #endif 39 | FL_EXPORT_C(void, flc_gl_draw_image)(const uchar* str, int x,int y,int w,int h); 40 | FL_EXPORT_C(void, flc_gl_draw_image_with_d)(const uchar* str, int x,int y,int w,int h, int d); 41 | FL_EXPORT_C(void, flc_gl_draw_image_with_d_ld)(const uchar* str, int x,int y,int w,int h, int ld); 42 | FL_EXPORT_C(void, flc_gl_draw_image_with_ld)(const uchar* str, int x,int y,int w,int h, int d, int ld); 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | #endif /* __GL_C__ */ 47 | -------------------------------------------------------------------------------- /src/xC.cpp: -------------------------------------------------------------------------------- 1 | #include "xC.h" 2 | #ifdef __cplusplus 3 | EXPORT { 4 | #endif 5 | FL_EXPORT_C(void,flc_open_display)( ){ 6 | fl_open_display(); 7 | } 8 | FL_EXPORT_C(void,flc_open_display_with_d)(Display* d){ 9 | fl_open_display(d); 10 | } 11 | FL_EXPORT_C(void,flc_close_display)( ){ 12 | fl_close_display(); 13 | } 14 | FL_EXPORT_C(ulong,flc_xpixel)(Fl_Color i){ 15 | return fl_xpixel(i); 16 | } 17 | FL_EXPORT_C(ulong,flc_xpixel_with_rgb)(uchar r,uchar g,uchar b){ 18 | return fl_xpixel(r,g,b); 19 | } 20 | FL_EXPORT_C(Fl_Bitmask,flc_create_bitmask)(int w,int h,const uchar* data){ 21 | return fl_create_bitmask(w,h,data); 22 | } 23 | FL_EXPORT_C(Fl_Bitmask,flc_create_alphamask)(int w,int h,int d,int ld,const uchar* data){ 24 | return fl_create_alphamask(w,h,d,ld,data); 25 | } 26 | FL_EXPORT_C(void,flc_delete_bitmask)(Fl_Bitmask bm){ 27 | fl_delete_bitmask(bm); 28 | } 29 | FL_EXPORT_C(void, flc_set_fl_display)(Display* d){ 30 | fl_display = d; 31 | } 32 | FL_EXPORT_C(Display*, flc_fl_display)(){ 33 | return fl_display; 34 | } 35 | FL_EXPORT_C(void, flc_set_fl_screen)(int screen){ 36 | fl_screen = screen; 37 | } 38 | FL_EXPORT_C(int, flc_fl_screen)(){ 39 | return fl_screen; 40 | } 41 | FL_EXPORT_C(void, flc_set_fl_colormap)(Colormap c){ 42 | fl_colormap = c; 43 | } 44 | FL_EXPORT_C(Colormap, flc_fl_colormap)(){ 45 | return fl_colormap; 46 | } 47 | FL_EXPORT_C(void, flc_set_fl_visual)(XVisualInfo* i){ 48 | fl_visual = i; 49 | } 50 | FL_EXPORT_C(XVisualInfo*, flc_fl_visual)(){ 51 | return fl_visual; 52 | } 53 | #ifdef __cplusplus 54 | } 55 | #endif 56 | -------------------------------------------------------------------------------- /src/xC.h: -------------------------------------------------------------------------------- 1 | #ifndef __X_C__ 2 | #define __X_C__ 3 | #ifdef __cplusplus 4 | // always include the FL/*.H headers before local headers 5 | // X is included transitively and needed for 6 | // the callback mechanism included below to work. 7 | #include "FL/Fl.H" 8 | #include "FL/x.H" 9 | #include "Fl_CallbackC.h" 10 | EXPORT { 11 | #endif 12 | #include 13 | #include 14 | #include 15 | typedef Region Fl_Region; 16 | typedef ulong Fl_Bitmask; 17 | FL_EXPORT_C(void, flc_open_display)(); 18 | FL_EXPORT_C(void, flc_open_display_with_d)(Display* d); 19 | FL_EXPORT_C(void, flc_close_display)(); 20 | FL_EXPORT_C(ulong, flc_xpixel)(Fl_Color i); 21 | FL_EXPORT_C(ulong, flc_xpixel_with_rgb)(uchar r, uchar g, uchar b); 22 | FL_EXPORT_C(Fl_Bitmask, flc_create_bitmask)(int w, int h, const uchar *data); 23 | FL_EXPORT_C(Fl_Bitmask, flc_create_alphamask)(int w, int h, int d, int ld, const uchar *data); 24 | FL_EXPORT_C(void, flc_delete_bitmask)(Fl_Bitmask bm); 25 | FL_EXPORT_C(void, flc_set_fl_display)(Display* d); 26 | FL_EXPORT_C(Display*, flc_fl_display)(); 27 | FL_EXPORT_C(void, flc_set_fl_screen)(int screen); 28 | FL_EXPORT_C(int, flc_fl_screen)(); 29 | FL_EXPORT_C(void, flc_set_fl_colormap)(Colormap c); 30 | FL_EXPORT_C(Colormap, flc_fl_colormap)(); 31 | FL_EXPORT_C(void, flc_set_fl_visual)(XVisualInfo* i); 32 | FL_EXPORT_C(XVisualInfo*, flc_fl_visual)(); 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | #endif /* __X_C__ */ 37 | --------------------------------------------------------------------------------