From 8d94d16c0b93ffa17878ffe31d0fba34b6130f4d Mon Sep 17 00:00:00 2001 From: David Capello Date: Sun, 23 Sep 2007 20:13:58 +0000 Subject: [PATCH] Added all the "Command" stuff. --- ChangeLog | 18 + LEGAL.txt | 9 +- NEWS.txt | 279 ++++---- TODO.txt | 1 + data/menus.en | 2 +- data/menus.es | 2 +- data/scripts/exit.lua | 24 - jinete/examples/00hello.c | 48 +- jinete/examples/01simple.c | 39 +- jinete/examples/02label.c | 39 +- jinete/examples/03slider.c | 103 +-- jinete/examples/04alert.c | 57 +- jinete/examples/05fsel.c | 39 +- jinete/examples/06entry.c | 39 +- jinete/examples/07panel.c | 63 +- jinete/examples/08txtbox.c | 39 +- jinete/examples/09lists.c | 39 +- jinete/examples/10chcks.c | 39 +- jinete/examples/11file.c | 39 +- jinete/examples/12qckmnu.c | 39 +- jinete/examples/13menu.c | 179 +++--- jinete/examples/14win.c | 39 +- jinete/examples/15colbut.c | 39 +- jinete/examples/16theme.c | 39 +- jinete/examples/17theme.c | 45 +- jinete/examples/18tips.c | 41 +- jinete/examples/19game.c | 39 +- jinete/examples/20combo.c | 39 +- jinete/examples/21manage.c | 101 +-- jinete/include/jinete.h | 33 +- jinete/include/jinete/accel.h | 31 +- jinete/include/jinete/alert.h | 31 +- jinete/include/jinete/base.h | 53 +- jinete/include/jinete/box.h | 31 +- jinete/include/jinete/button.h | 31 +- jinete/include/jinete/clipbrd.h | 31 +- jinete/include/jinete/combobox.h | 31 +- jinete/include/jinete/draw.h | 31 +- jinete/include/jinete/entry.h | 31 +- jinete/include/jinete/file.h | 31 +- jinete/include/jinete/filesel.h | 31 +- jinete/include/jinete/font.h | 31 +- jinete/include/jinete/hook.h | 31 +- jinete/include/jinete/image.h | 33 +- jinete/include/jinete/intern.h | 31 +- jinete/include/jinete/label.h | 31 +- jinete/include/jinete/list.h | 37 +- jinete/include/jinete/listbox.h | 31 +- jinete/include/jinete/manager.h | 31 +- jinete/include/jinete/menu.h | 31 +- jinete/include/jinete/message.h | 31 +- jinete/include/jinete/panel.h | 37 +- jinete/include/jinete/qckmenu.h | 31 +- jinete/include/jinete/rect.h | 31 +- jinete/include/jinete/region.h | 31 +- jinete/include/jinete/scroll.h | 31 +- jinete/include/jinete/sep.h | 31 +- jinete/include/jinete/slider.h | 31 +- jinete/include/jinete/system.h | 31 +- jinete/include/jinete/textbox.h | 31 +- jinete/include/jinete/theme.h | 31 +- jinete/include/jinete/view.h | 31 +- jinete/include/jinete/widget.h | 31 +- jinete/include/jinete/window.h | 31 +- jinete/makefile.lst | 14 +- jinete/src/jaccel.c | 31 +- jinete/src/jalert.c | 31 +- jinete/src/jbox.c | 31 +- jinete/src/jbutton.c | 39 +- jinete/src/jclipbrd.c | 31 +- jinete/src/jcombox.c | 31 +- jinete/src/jdraw.c | 31 +- jinete/src/jentry.c | 31 +- jinete/src/jfile.c | 48 +- jinete/src/jfilesel.c | 51 +- jinete/src/jfont.c | 31 +- jinete/src/jfontbmp.c | 31 +- jinete/src/jhook.c | 31 +- jinete/src/jimage.c | 61 +- jinete/src/jintern.c | 31 +- jinete/src/jlabel.c | 31 +- jinete/src/jlist.c | 31 +- jinete/src/jlistbox.c | 31 +- jinete/src/jmanager.c | 31 +- jinete/src/jmem.c | 31 +- jinete/src/jmenu.c | 35 +- jinete/src/jmessage.c | 31 +- jinete/src/jpanel.c | 39 +- jinete/src/jqckmenu.c | 37 +- jinete/src/jrect.c | 31 +- jinete/src/jsep.c | 31 +- jinete/src/jslider.c | 31 +- jinete/src/jsystem.c | 31 +- jinete/src/jtextbox.c | 145 +++-- jinete/src/jtheme.c | 31 +- jinete/src/jview.c | 31 +- jinete/src/jwidget.c | 117 ++-- jinete/src/jwindow.c | 31 +- jinete/src/themes/jsimple.c | 31 +- jinete/src/themes/jstand.c | 31 +- makefile.gcc | 1 + makefile.lst | 88 ++- makefile.mgw | 4 +- src/{dialogs/about.c => commands/cmd_about.c} | 115 ++-- src/commands/cmd_advanced_mode.c | 33 + src/commands/cmd_auto_crop_sprite.c | 33 + src/commands/cmd_brush_tool.c | 33 + src/commands/cmd_change_image_type.c | 33 + src/commands/cmd_clear.c | 33 + src/commands/cmd_close_all_files.c | 33 + src/commands/cmd_close_editor.c | 33 + src/commands/cmd_close_file.c | 33 + src/commands/cmd_color_curve.c | 33 + src/commands/cmd_configure_screen.c | 33 + src/commands/cmd_configure_tools.c | 33 + src/commands/cmd_convolution_matrix.c | 33 + src/commands/cmd_copy.c | 33 + src/commands/cmd_copy_frame.c | 33 + src/commands/cmd_crop_frame.c | 33 + src/commands/cmd_crop_layer.c | 33 + src/commands/cmd_crop_sprite.c | 33 + src/commands/cmd_customize.c | 33 + src/{dialogs/about.h => commands/cmd_cut.c} | 58 +- src/commands/cmd_deselect_mask.c | 33 + src/commands/cmd_despeckle.c | 33 + src/commands/cmd_dots_tool.c | 33 + src/commands/cmd_draw_text.c | 33 + src/commands/cmd_duplicate_layer.c | 33 + src/commands/cmd_duplicate_sprite.c | 33 + src/commands/cmd_ellipse_tool.c | 33 + src/commands/cmd_exit.c | 51 ++ src/commands/cmd_film_editor.c | 33 + src/commands/cmd_flatten_layers.c | 33 + src/commands/cmd_flip_horizontal.c | 33 + src/commands/cmd_flip_vertical.c | 33 + src/commands/cmd_floodfill_tool.c | 33 + src/commands/cmd_frame_properties.c | 33 + src/commands/cmd_invert_color.c | 33 + src/commands/cmd_invert_mask.c | 33 + src/commands/cmd_layer_properties.c | 33 + src/commands/cmd_line_tool.c | 33 + src/commands/cmd_link_frame.c | 33 + src/commands/cmd_load_mask.c | 33 + src/commands/cmd_load_session.c | 33 + src/commands/cmd_make_unique_editor.c | 33 + src/commands/cmd_mapgen.c | 33 + src/commands/cmd_marker_tool.c | 33 + src/commands/cmd_mask_all.c | 33 + src/commands/cmd_mask_by_color.c | 33 + src/commands/cmd_mask_repository.c | 33 + src/commands/cmd_merge_down_layer.c | 33 + src/commands/cmd_move_frame.c | 33 + src/commands/cmd_new_file.c | 166 +++++ src/commands/cmd_new_frame.c | 33 + src/commands/cmd_new_layer.c | 33 + src/commands/cmd_new_layer_set.c | 33 + src/commands/cmd_open_file.c | 33 + src/commands/cmd_options.c | 33 + src/commands/cmd_palette_editor.c | 33 + src/commands/cmd_paste.c | 33 + src/commands/cmd_pencil_tool.c | 33 + src/commands/cmd_play_flic.c | 33 + src/commands/cmd_preview_fit_to_screen.c | 33 + src/commands/cmd_preview_normal.c | 33 + src/commands/cmd_preview_tiled.c | 33 + src/commands/cmd_quick_copy.c | 33 + src/commands/cmd_quick_move.c | 33 + src/commands/cmd_record_screen.c | 33 + src/commands/cmd_rectangle_tool.c | 33 + src/commands/cmd_redo.c | 33 + src/commands/cmd_refresh.c | 33 + src/commands/cmd_remove_frame.c | 33 + src/commands/cmd_remove_layer.c | 33 + src/commands/cmd_replace_color.c | 33 + src/commands/cmd_reselect_mask.c | 33 + src/commands/cmd_run_script.c | 33 + src/commands/cmd_save_file.c | 33 + src/commands/cmd_save_file_as.c | 33 + src/commands/cmd_save_mask.c | 33 + src/commands/cmd_save_session.c | 33 + src/commands/cmd_screen_shot.c | 33 + src/commands/cmd_select_file.c | 33 + src/commands/cmd_split_editor_horizontally.c | 33 + src/commands/cmd_split_editor_vertically.c | 33 + src/commands/cmd_spray_tool.c | 33 + src/commands/cmd_sprite_properties.c | 33 + src/commands/cmd_tips.c | 33 + src/commands/cmd_undo.c | 33 + src/commands/commands.c | 296 +++++++++ src/commands/commands.h | 131 ++++ src/console/console.h | 16 +- src/core/app.c | 180 +++--- src/core/app.h | 30 +- src/core/config.c | 1 + src/core/core.c | 35 +- src/core/core.h | 8 +- src/core/dirs.c | 25 +- src/core/dirs.h | 6 +- src/core/modules.h | 6 +- src/dialogs/filmedit.c | 62 +- src/dialogs/tips.c | 4 +- src/file/png_file.c | 2 +- src/modules/color.h | 58 +- src/modules/editors.c | 12 +- src/modules/gui.c | 77 ++- src/modules/rootmenu.c | 596 ++++++++++++------ src/modules/rootmenu.h | 2 +- src/modules/sprites.c | 2 +- src/script/export.h | 11 +- src/script/genbinds.c | 24 +- src/widgets/{menu.c => menuitem.c} | 0 src/widgets/{menu.h => menuitem.h} | 6 +- 212 files changed, 7397 insertions(+), 1382 deletions(-) delete mode 100644 data/scripts/exit.lua rename src/{dialogs/about.c => commands/cmd_about.c} (81%) create mode 100644 src/commands/cmd_advanced_mode.c create mode 100644 src/commands/cmd_auto_crop_sprite.c create mode 100644 src/commands/cmd_brush_tool.c create mode 100644 src/commands/cmd_change_image_type.c create mode 100644 src/commands/cmd_clear.c create mode 100644 src/commands/cmd_close_all_files.c create mode 100644 src/commands/cmd_close_editor.c create mode 100644 src/commands/cmd_close_file.c create mode 100644 src/commands/cmd_color_curve.c create mode 100644 src/commands/cmd_configure_screen.c create mode 100644 src/commands/cmd_configure_tools.c create mode 100644 src/commands/cmd_convolution_matrix.c create mode 100644 src/commands/cmd_copy.c create mode 100644 src/commands/cmd_copy_frame.c create mode 100644 src/commands/cmd_crop_frame.c create mode 100644 src/commands/cmd_crop_layer.c create mode 100644 src/commands/cmd_crop_sprite.c create mode 100644 src/commands/cmd_customize.c rename src/{dialogs/about.h => commands/cmd_cut.c} (73%) create mode 100644 src/commands/cmd_deselect_mask.c create mode 100644 src/commands/cmd_despeckle.c create mode 100644 src/commands/cmd_dots_tool.c create mode 100644 src/commands/cmd_draw_text.c create mode 100644 src/commands/cmd_duplicate_layer.c create mode 100644 src/commands/cmd_duplicate_sprite.c create mode 100644 src/commands/cmd_ellipse_tool.c create mode 100644 src/commands/cmd_exit.c create mode 100644 src/commands/cmd_film_editor.c create mode 100644 src/commands/cmd_flatten_layers.c create mode 100644 src/commands/cmd_flip_horizontal.c create mode 100644 src/commands/cmd_flip_vertical.c create mode 100644 src/commands/cmd_floodfill_tool.c create mode 100644 src/commands/cmd_frame_properties.c create mode 100644 src/commands/cmd_invert_color.c create mode 100644 src/commands/cmd_invert_mask.c create mode 100644 src/commands/cmd_layer_properties.c create mode 100644 src/commands/cmd_line_tool.c create mode 100644 src/commands/cmd_link_frame.c create mode 100644 src/commands/cmd_load_mask.c create mode 100644 src/commands/cmd_load_session.c create mode 100644 src/commands/cmd_make_unique_editor.c create mode 100644 src/commands/cmd_mapgen.c create mode 100644 src/commands/cmd_marker_tool.c create mode 100644 src/commands/cmd_mask_all.c create mode 100644 src/commands/cmd_mask_by_color.c create mode 100644 src/commands/cmd_mask_repository.c create mode 100644 src/commands/cmd_merge_down_layer.c create mode 100644 src/commands/cmd_move_frame.c create mode 100644 src/commands/cmd_new_file.c create mode 100644 src/commands/cmd_new_frame.c create mode 100644 src/commands/cmd_new_layer.c create mode 100644 src/commands/cmd_new_layer_set.c create mode 100644 src/commands/cmd_open_file.c create mode 100644 src/commands/cmd_options.c create mode 100644 src/commands/cmd_palette_editor.c create mode 100644 src/commands/cmd_paste.c create mode 100644 src/commands/cmd_pencil_tool.c create mode 100644 src/commands/cmd_play_flic.c create mode 100644 src/commands/cmd_preview_fit_to_screen.c create mode 100644 src/commands/cmd_preview_normal.c create mode 100644 src/commands/cmd_preview_tiled.c create mode 100644 src/commands/cmd_quick_copy.c create mode 100644 src/commands/cmd_quick_move.c create mode 100644 src/commands/cmd_record_screen.c create mode 100644 src/commands/cmd_rectangle_tool.c create mode 100644 src/commands/cmd_redo.c create mode 100644 src/commands/cmd_refresh.c create mode 100644 src/commands/cmd_remove_frame.c create mode 100644 src/commands/cmd_remove_layer.c create mode 100644 src/commands/cmd_replace_color.c create mode 100644 src/commands/cmd_reselect_mask.c create mode 100644 src/commands/cmd_run_script.c create mode 100644 src/commands/cmd_save_file.c create mode 100644 src/commands/cmd_save_file_as.c create mode 100644 src/commands/cmd_save_mask.c create mode 100644 src/commands/cmd_save_session.c create mode 100644 src/commands/cmd_screen_shot.c create mode 100644 src/commands/cmd_select_file.c create mode 100644 src/commands/cmd_split_editor_horizontally.c create mode 100644 src/commands/cmd_split_editor_vertically.c create mode 100644 src/commands/cmd_spray_tool.c create mode 100644 src/commands/cmd_sprite_properties.c create mode 100644 src/commands/cmd_tips.c create mode 100644 src/commands/cmd_undo.c create mode 100644 src/commands/commands.c create mode 100644 src/commands/commands.h rename src/widgets/{menu.c => menuitem.c} (100%) rename src/widgets/{menu.h => menuitem.h} (92%) diff --git a/ChangeLog b/ChangeLog index 1d183d947..99f255751 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2007-09-23 David A. Capello + + * src/commands/cmd_new_sprite.c: Added (based on newspr.lua). + + * src/commands/cmd_exit.c (command_execute_exit): Added (based on + exit.lua). + +2007-09-21 David A. Capello + + * src/widgets/menu.c (menuitem_new): Modified to use only + commands. No more scripts for menus. + + * src/modules/commands.c: Added commands. + +2007-09-20 David A. Capello + + * jinete/src/jxml.c: Added routines to load XML files. + 2007-09-19 David A. Capello * src/modules/gui.c (display_switch_in_callback): Fixed (now it diff --git a/LEGAL.txt b/LEGAL.txt index 558169353..1b35214ea 100644 --- a/LEGAL.txt +++ b/LEGAL.txt @@ -3,7 +3,8 @@ LEGAL ISSUES =================================== - ASE is distributed under GPL license. -- Allegro and Jinete are gift-ware (doesn't have restrictions). +- Allegro is giftware license (similar to MIT license). +- Jinete is under BSD license. - ALFONT is under LGPL terms. - quantize.c is copyright by Ben Davis (you need his authorization to use his code in your own program). @@ -15,5 +16,9 @@ LEGAL ISSUES - Libart 2.3.3 is distributed under LGPL license. - Libintl is distributed under LGPL license. - The FreeType Project is distributed under FTL license. +- zlib & Libpng are under the ZLIB license. -You can find all these licenses in the "docs/licenses" directory. +You can find all these licenses in the "docs/licenses" directory, +or you can found them in: + + http://www.opensource.org/licenses/alphabetical diff --git a/NEWS.txt b/NEWS.txt index e5d376195..625133797 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -5,172 +5,179 @@ NEWS 0.6 --- -- Added support for PNG files (through libpng). -- Finally screen scaling supported (with double-buffering). This means ++ New XML format for the menus. Restructured all the menus (more user + friendly?) ++ Added menu customization through UI (Tools/Customize). +- Removed menu scripting customization. +- Removed screen saver. ++ GUI enhanced: more borders for windows, and more spacing between + widgets. ++ Added support for PNG files (through libpng). ++ Finally screen scaling supported (with double-buffering). This means that you can use a screen of 320x240 between a window of 640x480 (screen-scaling x2). This is the new default video mode for ASE. -- Fixed compilations errors for 4.x -- Fixed menus.es ++ Fixed compilations errors for 4.x ++ Fixed menus.es 0.5 --- -- Added features-requested by Carl Olsson: ++ Added features-requested by Carl Olsson: + better "snap to grid" support for box-like tools (rectangle, ellipse, etc.). + floating selection now "snap to grid" also. + added a subpixel movement for zoomed-cursors in the editor, to known where we are inside the pixel. -- Better support for the mouse wheel and middle button in the ++ Better support for the mouse wheel and middle button in the sprite-editor (to scroll and zoom). -- GIF support to save file fully supported by default. -- Fixed compilation with Allegro 4.2.3 SVN (and fixed a bug in Allegro ++ GIF support to save file fully supported by default. ++ Fixed compilation with Allegro 4.2.3 SVN (and fixed a bug in Allegro with key_shifts). -- Now the full-screen or windowed state is remembered (thanks ++ Now the full-screen or windowed state is remembered (thanks to Manuel De Miguel Moreno to report it). 0.4 --- - Removed the console mode. -- Changed Film Editor shortcut: TAB key. -- New feature: Each animation frame has duration. -- New Palette Editor (F4 key). -- Now sprites support multiple palettes: Each frame can has its own ++ Changed Film Editor shortcut: TAB key. ++ New feature: Each animation frame has duration. ++ New Palette Editor (F4 key). ++ Now sprites support multiple palettes: Each frame can has its own color palette. -- Added support to load GIF files (by Elias Pschernig). -- Added a combobox to file-selection to handle the bookmarks. -- Added rotation!!! Now you can scale and rotate what you paste from ++ Added support to load GIF files (by Elias Pschernig). ++ Added a combobox to file-selection to handle the bookmarks. ++ Added rotation!!! Now you can scale and rotate what you paste from the clipboard. 0.3.1 ----- -- Fixed the creation of session files when an exception (fatal error) ++ Fixed the creation of session files when an exception (fatal error) happens in Windows. -- Added es.po and tips.es files. ++ Added es.po and tips.es files. 0.3 --- -- Added session manager (if the program crashes the session is saved ++ Added session manager (if the program crashes the session is saved automatically). -- Added a tool to draw text (finally). -- More documentation and tips. -- Improved the frame adding process. -- Fixed important bugs. -- Added a mapgen utility (original code by Johan Halmén and Anders ++ Added a tool to draw text (finally). ++ More documentation and tips. ++ Improved the frame adding process. ++ Fixed important bugs. ++ Added a mapgen utility (original code by Johan Halmén and Anders Andersson). -- Spanish language support (now works in Windows too). -- Internal code improved (mainly GUI parts, and functions names). ++ Spanish language support (now works in Windows too). ++ Internal code improved (mainly GUI parts, and functions names). 0.2.4 ----- -- More stable undo: with limit and without the strange ++ More stable undo: with limit and without the strange redo-after-overwrite-undo feature. -- New median filter to despeckle images. -- Updated alternative support to load/save JPEG files with JPGalleg 2.3 ++ New median filter to despeckle images. ++ Updated alternative support to load/save JPEG files with JPGalleg 2.3 library, thanks to Angelo Mottola for this. -- Fixed problems with non-US keyboards: the Alt key can't be used for ++ Fixed problems with non-US keyboards: the Alt key can't be used for shortcuts. Some combinations changes: + <~> to <`> (open film editor) + to (mask by color) + to (close current editor) -- Added Cut, Copy, Paste! -- Added AutoCrop (before known as Trim). ++ Added Cut, Copy, Paste! ++ Added AutoCrop (before known as Trim). 0.2.3 ----- -- Fixed routine to save JPG files. -- Fixed and improved various parts of GUI. ++ Fixed routine to save JPG files. ++ Fixed and improved various parts of GUI. 0.2.2 ----- -- Added some documentation to write Lua scripts. -- Film Editor was improved. -- Fixed errors with the graphics cursor, some keyboard problems, and ++ Added some documentation to write Lua scripts. ++ Film Editor was improved. ++ Fixed errors with the graphics cursor, some keyboard problems, and various minor bugs. -- New tips with text and images. This will be very useful for ++ New tips with text and images. This will be very useful for beginners. -- Onionskin feature is done. -- Added (optional) ordered dithering to render RGB images in 8 bpp. -- New actions: Merge Down, New Frame, Copy Frame, change Image Type!, ++ Onionskin feature is done. ++ Added (optional) ordered dithering to render RGB images in 8 bpp. ++ New actions: Merge Down, New Frame, Copy Frame, change Image Type!, Load Script File. -- Optimized the drawing speed with tiled mode. ++ Optimized the drawing speed with tiled mode. 0.2.1 ----- -- Fixed in Windows version: spray and some errors saving file-names in ++ Fixed in Windows version: spray and some errors saving file-names in the configuration file. -- Added libintl support and the Spanish translation (only for Linux, ++ Added libintl support and the Spanish translation (only for Linux, but I have planned make this usable in Windows). -- More undo support: insert/remove layers and mask modifications. -- Filters Convolution Matrix and Color Curve are back. -- Added more basic operations (with undo support): flatten layers, ++ More undo support: insert/remove layers and mask modifications. ++ Filters Convolution Matrix and Color Curve are back. ++ Added more basic operations (with undo support): flatten layers, duplicate layer, duplicate sprite, horizontal/vertical flip, crop frame. -- New .ASE format (in alpha status, please test it!). -- Easy script routines: now are a high-level layer of routines (easy ++ New .ASE format (in alpha status, please test it!). ++ Easy script routines: now are a high-level layer of routines (easy to use and understand), and the low-level routine's set (for internal or more specific works). - Removed all the interpolation stuff between key-frames: yes, after thinking, this make too hard the animation edition (so the "fancy spline interpolation" was removed). -- Optimized the editor's speed in scroll movements. -- The Film Editor is almost done for layers and frames handle. -- Fixed filters using mask with displaced layers. -- Support to apply filters to various frames/layers at the same time. -- Added differents screen layouts in main.jid (see FAQ.txt to see how ++ Optimized the editor's speed in scroll movements. ++ The Film Editor is almost done for layers and frames handle. ++ Fixed filters using mask with displaced layers. ++ Support to apply filters to various frames/layers at the same time. ++ Added differents screen layouts in main.jid (see FAQ.txt to see how change between them). -- The tool bar is back! ++ The tool bar is back! 0.2 --- -- Fixed a lot of bugs. -- Added optional support for JPEG with JPGalleg 2.0 library. -- Added draw mode: Opaque (normal), Glass (transparent), Semi ++ Fixed a lot of bugs. ++ Added optional support for JPEG with JPGalleg 2.0 library. ++ Added draw mode: Opaque (normal), Glass (transparent), Semi (pattern). -- Added brush types: Circle, Square, Line. -- Implemented a fake-palette system to make the GUI usable with any ++ Added brush types: Circle, Square, Line. ++ Implemented a fake-palette system to make the GUI usable with any sprite palette (mainly to avoid "black-screen" situations when open sprites with ugly palettes). -- The palette editor has more improvements (like the possibility to ++ The palette editor has more improvements (like the possibility to move the selection range). -- "menus" file modified a bit. Some keyboard bindings have change ++ "menus" file modified a bit. Some keyboard bindings have change (and new ones added), you can see the "docs/QuickHelp.html" file for more help. Anyway, I try to leave the compability in the more used commands. -- Full scripting support with Lua-5.0. Sprites and GUI controllable ++ Full scripting support with Lua-5.0. Sprites and GUI controllable from same scripts, to give you an idea, various of menus actions are programmed directly with scripts. -- Complete selection handle (mask regions). You can select irregular ++ Complete selection handle (mask regions). You can select irregular areas (add, subtract, intersect, by color), save and load them in the .MSK Animator Pro format. -- Multiple editors. Now you will be able to edit an image with zoom ++ Multiple editors. Now you will be able to edit an image with zoom and see the results in other editors (updated in real-time). -- New Gfx-core. All sprite/image/layer/prop/key stuff was ++ New Gfx-core. All sprite/image/layer/prop/key stuff was reprogrammed. The more big change, was to property/keyframe level (the properties can be with lineal or spline interpolation, also, have a ending flag to make circular movements or patterns of movement). -- New GUI. The look and the internal code was reestructured ++ New GUI. The look and the internal code was reestructured completelly, I made a new GUI library: Jinete (rider). 0.1.2 ----- -- New RLE Gaussian Blur effect (from The GIMP source code). -- Blender modes are back!: Normal, Multiply, Screen, Overlay, ++ New RLE Gaussian Blur effect (from The GIMP source code). ++ Blender modes are back!: Normal, Multiply, Screen, Overlay, Hard Light, Darken, Lighten, Addition, Subtract, Difference, Hue, Saturation, Color, Luminosity. -- Better the GUI look: With colors, this should be less boring :-) -- Added a graphics selection dialog where you can specify any ++ Better the GUI look: With colors, this should be less boring :-) ++ Added a graphics selection dialog where you can specify any resolution (this could be useful for windowed modes). -- Back again to the good-and-peaceful-allegro-like makefiles. Ok, ok, ++ Back again to the good-and-peaceful-allegro-like makefiles. Ok, ok, the GNU style was the worst change in ASE, but now is fixed :-) - Removed the .DLL or .so capability for plug-ins. After some weeks of thinking, I decide to strip off this feature because is too hard to @@ -179,138 +186,138 @@ NEWS the plug-in and modify the `menus' to add a new entry with a little script-string to call the new plug-in action. Also, this save me a lot of headaches :-) -- Added multiple filter application: Now, you can apply effects to ++ Added multiple filter application: Now, you can apply effects to every layer, to every animation frame, or both. -- Added the "Recent Files" list. -- A complete set of scripts routines to handle paths. -- New selection type: "shrink", to shrink the selection to the current ++ Added the "Recent Files" list. ++ A complete set of scripts routines to handle paths. ++ New selection type: "shrink", to shrink the selection to the current layer bitmap bounds. -- New "trim_sprite" action. ++ New "trim_sprite" action. 0.1.0 ----- - Removed the `move' tool to displace layers (it was redundant). -- New interface to load Plug-Ins in a dynamic way (DLL, .so). -- Complete new support for JPEG files (RGB/grayscale) load/save: ++ New interface to load Plug-Ins in a dynamic way (DLL, .so). ++ Complete new support for JPEG files (RGB/grayscale) load/save: athwart the Independent JPEG Group's JPEG Library. -- New actions: ++ New actions: + trim_layer_bitmap: trim the current layer to the selection bounds. + merge_down: to merge the current layer with the next one. + make_undo_animation: to make an animation from the undo operations (to see all the progression of the graphics). + undo_history: to undo/redo various operations. + color_curve: to make color conversion effects pixel by pixel. -- Improved the `Color Replace' command (with `tolerance' and `preview'). -- A new optimized layer-bar, to handle all the keyframe/properties stuff. -- Various things rewritten to Plug-Ins: ++ Improved the `Color Replace' command (with `tolerance' and `preview'). ++ A new optimized layer-bar, to handle all the keyframe/properties stuff. ++ Various things rewritten to Plug-Ins: + file formats, + actions for menus (also, now these actions can be used from scripts). -- Replaced the old `color depth' system to the new `image types': ++ Replaced the old `color depth' system to the new `image types': From now, an image can be: RGB, Grayscale, or Indexed type. -- New ASE Library, with a complete new design to handle: ++ New ASE Library, with a complete new design to handle: images, layers, bitmaps, properties, keyframes, etc. -- Source code to GNU style: with configure.in, Makefile.am, etc. ++ Source code to GNU style: with configure.in, Makefile.am, etc. 0.0.7 ----- -- New scripts routines: request(), apply_filter(), load_sprite(), ++ New scripts routines: request(), apply_filter(), load_sprite(), and save_sprite(). -- Support to load FLI/FLC and to save FLC files. Yes! Now with ASE ++ Support to load FLI/FLC and to save FLC files. Yes! Now with ASE you can make FLC animations with a good compression performance. -- Added the posibility to load/save sequences of bitmaps: like ani00.pcx, ++ Added the posibility to load/save sequences of bitmaps: like ani00.pcx, ani01.pcx, ani02.pcx, etc. -- More undo functionality. I re-wrote the entire `undo' system. -- New rectangular-selection tool: Now you can cut, copy, paste and clear. -- New RLE compression for 8 bpp in .ase files. -- Support to load .ase files of `0.0.6' and `0.0.7 CVS (important stage)': ++ More undo functionality. I re-wrote the entire `undo' system. ++ New rectangular-selection tool: Now you can cut, copy, paste and clear. ++ New RLE compression for 8 bpp in .ase files. ++ Support to load .ase files of `0.0.6' and `0.0.7 CVS (important stage)': I recommend you upgrade all your .ase files to the `0.0.7 release' version. -- New properties for keyframes: now each keyframe has its position and alpha, ++ New properties for keyframes: now each keyframe has its position and alpha, with this you can make animations of objects moving only the keyframes (all the intermediate frames will be calculate automatically). -- Now the program remember the configuration (through `ase.cfg'). -- Added a new draw-tiled mode. -- New full-screen editing mode. With resizable layer-bar. -- Added an options to draw the previous frame in transparent mode. ++ Now the program remember the configuration (through `ase.cfg'). ++ Added a new draw-tiled mode. ++ New full-screen editing mode. With resizable layer-bar. ++ Added an options to draw the previous frame in transparent mode. - Removed the `background' properties of layers: from now, a layer will be transparent (masked-blitting) ever. With this are fixed a lot of problems with load/save routines in old versions. -- New `reload_menus' command. ++ New `reload_menus' command. 0.0.6 ----- - I still don't recommend you the .ase format (just for temporary usage): there are planes to change it. -- Scripting capability athwart Lua language (http://www.lua.org/): ++ Scripting capability athwart Lua language (http://www.lua.org/): now, you can make automatic tasks programming your own scripts (included some scripts as example). -- Independent `alpha' (global transparency) and `blender-mode' for ++ Independent `alpha' (global transparency) and `blender-mode' for each layer (like in GIMP and Adobe Photoshop). -- Improved the layer/frame-control: ++ Improved the layer/frame-control: Now add/remove/move/copy layer and frames are really-very-easy with the new layer-panel (like in Macromedia Flash). -- More easy tool-configuration. -- New drawing tool: real-pencil, with a unique and original algorithm. ++ More easy tool-configuration. ++ New drawing tool: real-pencil, with a unique and original algorithm. - Removed all the use of the Allegro GUI. -- New original (and ugly) GUI look: ++ New original (and ugly) GUI look: now, the colors are in harmony for the eyes. 0.0.5 ----- -- More facilities to handle colors with different `alpha'. -- New animation control: need test (see `bugs.txt' to report errors). -- Optimized the color-selection dialog: now you can make gammas ++ More facilities to handle colors with different `alpha'. ++ New animation control: need test (see `bugs.txt' to report errors). ++ Optimized the color-selection dialog: now you can make gammas between *four* colors. -- Added a `preview' in the apply-filter dialog. -- New improved gui system (for the users and for the developers). -- New `tile' and `reload' option for the filters. -- New view-tile option in tool-menu (for make tileable patterns). ++ Added a `preview' in the apply-filter dialog. ++ New improved gui system (for the users and for the developers). ++ New `tile' and `reload' option for the filters. ++ New view-tile option in tool-menu (for make tileable patterns). 0.0.4 ----- -- Modificable draw properties: ++ Modificable draw properties: thickness, alpha color, spray random factor, and spray radius. -- Undo support for all tools. -- Multiple drawing tools support: ++ Undo support for all tools. ++ Multiple drawing tools support: pixel, pencil, fill, spray, line, rectangle, and ellipse; -- New improved layer control. -- A lot of optimizations in the status bar. -- New duplicate sprite option. -- New session manager, for load and save your work. Other utility of this, ++ New improved layer control. ++ A lot of optimizations in the status bar. ++ New duplicate sprite option. ++ New session manager, for load and save your work. Other utility of this, is if the program crash for any reason, it auto-backups your data. - Bad news: the old .ase format is incompatible with the new one: I recommend you don't save in .ase until the 0.1 release. -- New "visible" property for hide and show the layers. -- New change color-depth function. -- Added a set-gfx-mode option in the system-menu. -- New duplicate layer support. ++ New "visible" property for hide and show the layers. ++ New change color-depth function. ++ Added a set-gfx-mode option in the system-menu. ++ New duplicate layer support. 0.0.3 ----- -- New .ase format (for save the layers). -- More keyboard shorcuts (with a new `keys.txt'). -- New layers operations: insert, move and remove. -- RGBA (alpha channel) bitmaps support. -- New filter capability, with some examples of filters. -- An incredible new way to create dialogs (for programmers only). -- More "Windows friendly" text files. -- New optimized status bar. -- New improved look of the GUI. ++ New .ase format (for save the layers). ++ More keyboard shorcuts (with a new `keys.txt'). ++ New layers operations: insert, move and remove. ++ RGBA (alpha channel) bitmaps support. ++ New filter capability, with some examples of filters. ++ An incredible new way to create dialogs (for programmers only). ++ More "Windows friendly" text files. ++ New optimized status bar. ++ New improved look of the GUI. 0.0.2 ----- -- New "infinite" Undo & Redo support. -- Some importants bug fixed. ++ New "infinite" Undo & Redo support. ++ Some importants bug fixed. 0.0.1 ----- -- One tool: interactive line. -- Color selection support. ++ One tool: interactive line. ++ Color selection support. - Poor palette modification capability. diff --git a/TODO.txt b/TODO.txt index 4cadaf74d..3a0c0037d 100644 --- a/TODO.txt +++ b/TODO.txt @@ -25,6 +25,7 @@ High priority work - quick swap; + the regions mustn't be overlapped; - options to change the curve type (in curedit.c); +- sprite resize; - canvas size; + with the current crop this isn't necessary anymore; + anyway, it's a good way to expand the graphics diff --git a/data/menus.en b/data/menus.en index 4ca294042..75adf5c9a 100644 --- a/data/menus.en +++ b/data/menus.en @@ -266,7 +266,7 @@ F&rame FRAME_POPUP { "Fi&lm Editor" FILMEDITOR_ACCEL = has_sprite "switch_between_film_and_sprite_editor()" ; "&Palette Editor" = always "dialogs_palette_editor()" ; ---- - "F&ilters Popup Menu" = always "show_filters_popup_menu()" ; + "F&ilters Popup Menu" = always "show_fx_popup_menu()" ; } L&ist SPRITE_LIST ; diff --git a/data/menus.es b/data/menus.es index 347c2a4de..381863d28 100644 --- a/data/menus.es +++ b/data/menus.es @@ -183,7 +183,7 @@ F&rame FRAME_POPUP { "E&ditor de Película" FILMEDITOR_ACCEL = has_sprite "switch_between_film_and_sprite_editor()" ; "&Paleta de Colores" = always "dialogs_palette_editor()" ; ---- - "Popup Menu de &Filtros" = always "show_filters_popup_menu()" ; + "Popup Menu de &Filtros" = always "show_fx_popup_menu()" ; } L&ista SPRITE_LIST ; diff --git a/data/scripts/exit.lua b/data/scripts/exit.lua deleted file mode 100644 index c7eb3dc87..000000000 --- a/data/scripts/exit.lua +++ /dev/null @@ -1,24 +0,0 @@ --- ase -- allegro-sprite-editor: the ultimate sprites factory --- Copyright (C) 2001-2005 by David A. Capello - -function GUI_Exit() - local sprite = get_first_sprite() - local clipboard = get_clipboard_sprite() - - while sprite do - -- check if this sprite is modified - if sprite_is_modified(sprite) - and (not clipboard - or sprite.id != clipboard.id) then - if jalert(_("Warning< @@ -14,9 +39,11 @@ int main (int argc, char *argv[]) /* Allegro stuff */ allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/02label.c b/jinete/examples/02label.c index d3a74dffe..2cd272d8f 100644 --- a/jinete/examples/02label.c +++ b/jinete/examples/02label.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -14,9 +39,11 @@ int main (int argc, char *argv[]) JWidget manager, window, box, label1, label2, label3, label4; allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/03slider.c b/jinete/examples/03slider.c index acd398e72..348a0bc20 100644 --- a/jinete/examples/03slider.c +++ b/jinete/examples/03slider.c @@ -1,62 +1,89 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include "jinete.h" -int main (int argc, char *argv[]) +int main(int argc, char *argv[]) { JWidget manager, window, box; JWidget slider1, slider2, slider3, slider4, slider5, button1; /* Allegro stuff */ - allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + allegro_init(); + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } - install_timer (); - install_keyboard (); - install_mouse (); + install_timer(); + install_keyboard(); + install_mouse(); /* Jinete initialization */ - manager = jmanager_new (); - ji_set_standard_theme (); + manager = jmanager_new(); + ji_set_standard_theme(); - window = jwindow_new ("Example 03"); - box = jbox_new (JI_VERTICAL); - slider1 = jslider_new (0, 1, 0); - slider2 = jslider_new (0, 2, 0); - slider3 = jslider_new (0, 10, 0); - slider4 = jslider_new (0, 63, 1); - slider5 = jslider_new (0, 255, 1); - button1 = jbutton_new ("&Close"); + window = jwindow_new("Example 03"); + box = jbox_new(JI_VERTICAL); + slider1 = jslider_new(0, 1, 0); + slider2 = jslider_new(0, 2, 0); + slider3 = jslider_new(0, 10, 0); + slider4 = jslider_new(0, 63, 1); + slider5 = jslider_new(0, 255, 1); + button1 = jbutton_new("&Close"); - jwidget_set_static_size (slider1, 128, 0); - jwidget_set_static_size (slider2, 128, 0); - jwidget_set_static_size (slider3, 128, 0); - jwidget_set_static_size (slider4, 128, 0); - jwidget_set_static_size (slider5, 128, 0); + jwidget_set_static_size(slider1, 128, 0); + jwidget_set_static_size(slider2, 128, 0); + jwidget_set_static_size(slider3, 128, 0); + jwidget_set_static_size(slider4, 128, 0); + jwidget_set_static_size(slider5, 128, 0); - jwidget_expansive (slider1, TRUE); - jwidget_expansive (slider2, TRUE); - jwidget_expansive (slider3, TRUE); - jwidget_expansive (slider4, TRUE); - jwidget_expansive (slider5, TRUE); + jwidget_expansive(slider1, TRUE); + jwidget_expansive(slider2, TRUE); + jwidget_expansive(slider3, TRUE); + jwidget_expansive(slider4, TRUE); + jwidget_expansive(slider5, TRUE); - jwidget_add_child (window, box); - jwidget_add_childs (box, - slider1, slider2, slider3, - slider4, slider5, button1, NULL); + jwidget_add_child(window, box); + jwidget_add_childs(box, + slider1, slider2, slider3, + slider4, slider5, button1, NULL); - jwindow_open_bg (window); + jwindow_open_bg(window); - jmanager_run (manager); - jmanager_free (manager); + jmanager_run(manager); + jmanager_free(manager); return 0; } diff --git a/jinete/examples/04alert.c b/jinete/examples/04alert.c index 3327c61ce..51c61db64 100644 --- a/jinete/examples/04alert.c +++ b/jinete/examples/04alert.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -14,23 +39,25 @@ int main (int argc, char *argv[]) int ret; /* Allegro stuff */ - allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + allegro_init(); + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } - install_timer (); - install_keyboard (); - install_mouse (); + install_timer(); + install_keyboard(); + install_mouse(); /* Jinete initialization */ - manager = jmanager_new (); - ji_set_standard_theme (); + manager = jmanager_new(); + ji_set_standard_theme(); - jmanager_refresh_screen (); - ji_mouse_set_cursor (JI_CURSOR_NORMAL); + jmanager_refresh_screen(); + ji_mouse_set_cursor(JI_CURSOR_NORMAL); - jalert ("Normal==First Alert||&Ok"); + jalert("Normal==First Alert||&Ok"); jalert ("Error" "==This is a long text line" "--" diff --git a/jinete/examples/05fsel.c b/jinete/examples/05fsel.c index abf18f45f..6f27f55e8 100644 --- a/jinete/examples/05fsel.c +++ b/jinete/examples/05fsel.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -16,9 +41,11 @@ int main (int argc, char *argv[]) /* Allegro stuff */ allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/06entry.c b/jinete/examples/06entry.c index c5f6cdc6f..4a102bc52 100644 --- a/jinete/examples/06entry.c +++ b/jinete/examples/06entry.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -16,9 +41,11 @@ int main (int argc, char *argv[]) allegro_init (); set_color_depth (8); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/07panel.c b/jinete/examples/07panel.c index 18eb87232..9bb1f686a 100644 --- a/jinete/examples/07panel.c +++ b/jinete/examples/07panel.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -12,24 +37,26 @@ int main (int argc, char *argv[]) { JWidget manager, window, box1, box2, view1, view2, button; - allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + allegro_init(); + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } - install_timer (); - install_keyboard (); - install_mouse (); + install_timer(); + install_keyboard(); + install_mouse(); - manager = jmanager_new (); - ji_set_standard_theme (); + manager = jmanager_new(); + ji_set_standard_theme(); - window = jwindow_new ("Example 07"); - box1 = jbox_new (JI_VERTICAL); - box2 = ji_panel_new (JI_HORIZONTAL); - view1 = jview_new (); - view2 = jview_new (); - button = jbutton_new ("&Close"); + window = jwindow_new("Example 07"); + box1 = jbox_new(JI_VERTICAL); + box2 = jpanel_new(JI_HORIZONTAL); + view1 = jview_new(); + view2 = jview_new(); + button = jbutton_new("&Close"); jwidget_expansive (view1, TRUE); jwidget_expansive (view2, TRUE); diff --git a/jinete/examples/08txtbox.c b/jinete/examples/08txtbox.c index 892ed07ed..6800cdda6 100644 --- a/jinete/examples/08txtbox.c +++ b/jinete/examples/08txtbox.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -69,9 +94,11 @@ int main (int argc, char *argv[]) JWidget manager; allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/09lists.c b/jinete/examples/09lists.c index da4abbae5..ff9a130b1 100644 --- a/jinete/examples/09lists.c +++ b/jinete/examples/09lists.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -19,9 +44,11 @@ int main(int argc, char *argv[]) JRect pos; allegro_init(); - if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer(); install_keyboard(); diff --git a/jinete/examples/10chcks.c b/jinete/examples/10chcks.c index 4978834dd..a24a679f3 100644 --- a/jinete/examples/10chcks.c +++ b/jinete/examples/10chcks.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -25,9 +50,11 @@ int main (int argc, char *argv[]) int c; allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/11file.c b/jinete/examples/11file.c index d8492b95b..dbc6b6b9c 100644 --- a/jinete/examples/11file.c +++ b/jinete/examples/11file.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -16,9 +41,11 @@ int main (int argc, char *argv[]) /* Allegro stuff */ allegro_init (); - if (set_gfx_mode (GFX_SAFE, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/12qckmnu.c b/jinete/examples/12qckmnu.c index d2e44c16c..9444d2125 100644 --- a/jinete/examples/12qckmnu.c +++ b/jinete/examples/12qckmnu.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -38,9 +63,11 @@ int main (int argc, char *argv[]) JWidget manager, window, box, button, menubar; allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/13menu.c b/jinete/examples/13menu.c index 96f459e73..068ec6787 100644 --- a/jinete/examples/13menu.c +++ b/jinete/examples/13menu.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -9,10 +34,10 @@ #include "jinete.h" -static JWidget new_menuitem (const char *text, const char *accel_string); -static bool hooked_menuitem_msg_proc (JWidget widget, JMessage msg); +static JWidget new_menuitem(const char *text, const char *accel_string); +static bool hooked_menuitem_msg_proc(JWidget widget, JMessage msg); -int main (int argc, char *argv[]) +int main(int argc, char *argv[]) { JWidget manager, window, box1, button; JWidget menu; @@ -38,103 +63,105 @@ int main (int argc, char *argv[]) JWidget menuitem_edit_paste; JWidget menuitem_edit_clear; - allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + allegro_init(); + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } - install_timer (); - install_keyboard (); - install_mouse (); + install_timer(); + install_keyboard(); + install_mouse(); - manager = jmanager_new (); - ji_set_standard_theme (); + manager = jmanager_new(); + ji_set_standard_theme(); - window = jwindow_new ("Menus"); - box1 = jbox_new (JI_VERTICAL); - button = jbutton_new ("&Close"); - menu = jmenu_new (); - menubar = jmenubar_new (); - menuitem_file = jmenuitem_new ("&File"); - menuitem_edit = jmenuitem_new ("&Edit"); - menuitem_tool = new_menuitem ("&Tools", NULL); - menuitem_help = new_menuitem ("&Help", NULL); - menu_file = jmenu_new (); - menuitem_file_new = jmenuitem_new ("&New"); - menuitem_file_open = new_menuitem ("&Open", ""); - menuitem_file_save = new_menuitem ("&Save", ""); jwidget_disable (menuitem_file_save); - menuitem_file_sep1 = ji_separator_new (NULL, JI_HORIZONTAL); - menuitem_file_quit = new_menuitem ("&Quit", ""); - menu_filenew = jmenu_new (); - menuitem_filenew_sprite = new_menuitem ("&Sprite", NULL); - menuitem_filenew_image = new_menuitem ("&Image", NULL); - menuitem_filenew_font = new_menuitem ("&Font", NULL); - menuitem_filenew_palette = new_menuitem ("&Palette", NULL); + window = jwindow_new("Menus"); + box1 = jbox_new(JI_VERTICAL); + button = jbutton_new("&Close"); + menu = jmenu_new(); + menubar = jmenubar_new(); + menuitem_file = jmenuitem_new("&File"); + menuitem_edit = jmenuitem_new("&Edit"); + menuitem_tool = new_menuitem("&Tools", NULL); + menuitem_help = new_menuitem("&Help", NULL); + menu_file = jmenu_new(); + menuitem_file_new = jmenuitem_new("&New"); + menuitem_file_open = new_menuitem("&Open", ""); + menuitem_file_save = new_menuitem("&Save", ""); jwidget_disable (menuitem_file_save); + menuitem_file_sep1 = ji_separator_new(NULL, JI_HORIZONTAL); + menuitem_file_quit = new_menuitem("&Quit", ""); + menu_filenew = jmenu_new(); + menuitem_filenew_sprite = new_menuitem("&Sprite", NULL); + menuitem_filenew_image = new_menuitem("&Image", NULL); + menuitem_filenew_font = new_menuitem("&Font", NULL); + menuitem_filenew_palette = new_menuitem("&Palette", NULL); menu_edit = jmenu_new (); - menuitem_edit_cut = new_menuitem ("Cu&t", ""); - menuitem_edit_copy = new_menuitem ("&Copy", ""); - menuitem_edit_paste = new_menuitem ("&Paste", ""); - menuitem_edit_clear = new_menuitem ("C&lear", ""); + menuitem_edit_cut = new_menuitem("Cu&t", ""); + menuitem_edit_copy = new_menuitem("&Copy", ""); + menuitem_edit_paste = new_menuitem("&Paste", ""); + menuitem_edit_clear = new_menuitem("C&lear", ""); - jwidget_add_child (menu_file, menuitem_file_new); - jwidget_add_child (menu_file, menuitem_file_open); - jwidget_add_child (menu_file, menuitem_file_save); - jwidget_add_child (menu_file, menuitem_file_sep1); - jwidget_add_child (menu_file, menuitem_file_quit); - jmenuitem_set_submenu (menuitem_file, menu_file); + jwidget_add_child(menu_file, menuitem_file_new); + jwidget_add_child(menu_file, menuitem_file_open); + jwidget_add_child(menu_file, menuitem_file_save); + jwidget_add_child(menu_file, menuitem_file_sep1); + jwidget_add_child(menu_file, menuitem_file_quit); + jmenuitem_set_submenu(menuitem_file, menu_file); - jwidget_add_child (menu_filenew, menuitem_filenew_sprite); - jwidget_add_child (menu_filenew, menuitem_filenew_image); - jwidget_add_child (menu_filenew, menuitem_filenew_font); - jwidget_add_child (menu_filenew, menuitem_filenew_palette); - jmenuitem_set_submenu (menuitem_file_new, menu_filenew); + jwidget_add_child(menu_filenew, menuitem_filenew_sprite); + jwidget_add_child(menu_filenew, menuitem_filenew_image); + jwidget_add_child(menu_filenew, menuitem_filenew_font); + jwidget_add_child(menu_filenew, menuitem_filenew_palette); + jmenuitem_set_submenu(menuitem_file_new, menu_filenew); - jwidget_add_child (menu_edit, menuitem_edit_cut); - jwidget_add_child (menu_edit, menuitem_edit_copy); - jwidget_add_child (menu_edit, menuitem_edit_paste); - jwidget_add_child (menu_edit, menuitem_edit_clear); - jmenuitem_set_submenu (menuitem_edit, menu_edit); + jwidget_add_child(menu_edit, menuitem_edit_cut); + jwidget_add_child(menu_edit, menuitem_edit_copy); + jwidget_add_child(menu_edit, menuitem_edit_paste); + jwidget_add_child(menu_edit, menuitem_edit_clear); + jmenuitem_set_submenu(menuitem_edit, menu_edit); - jwidget_add_child (menu, menuitem_file); - jwidget_add_child (menu, menuitem_edit); - jwidget_add_child (menu, menuitem_tool); - jwidget_add_child (menu, menuitem_help); - jmenubar_set_menu (menubar, menu); + jwidget_add_child(menu, menuitem_file); + jwidget_add_child(menu, menuitem_edit); + jwidget_add_child(menu, menuitem_tool); + jwidget_add_child(menu, menuitem_help); + jmenubar_set_menu(menubar, menu); - jwidget_add_child (box1, menubar); - jwidget_add_child (box1, button); - jwidget_add_child (window, box1); + jwidget_add_child(box1, menubar); + jwidget_add_child(box1, button); + jwidget_add_child(window, box1); - jwindow_open_bg (window); + jwindow_open_bg(window); - jmanager_run (manager); - jmanager_free (manager); + jmanager_run(manager); + jmanager_free(manager); return 0; } -END_OF_MAIN (); +END_OF_MAIN(); -static JWidget new_menuitem (const char *text, const char *accel_string) +static JWidget new_menuitem(const char *text, const char *accel_string) { - JWidget menuitem = jmenuitem_new (text); - JAccel accel = jaccel_new (); + JWidget menuitem = jmenuitem_new(text); + JAccel accel = jaccel_new(); - jwidget_add_hook (menuitem, JI_WIDGET, - hooked_menuitem_msg_proc, NULL); + jwidget_add_hook(menuitem, JI_WIDGET, + hooked_menuitem_msg_proc, NULL); if (accel_string) - jaccel_add_keys_from_string (accel, accel_string); + jaccel_add_keys_from_string(accel, accel_string); - jmenuitem_set_accel (menuitem, accel); + jmenuitem_set_accel(menuitem, accel); return menuitem; } -static bool hooked_menuitem_msg_proc (JWidget widget, JMessage msg) +static bool hooked_menuitem_msg_proc(JWidget widget, JMessage msg) { if (msg->type == JM_SIGNAL && msg->signal.num == JI_SIGNAL_MENUITEM_SELECT) - printf ("Selected item: %s\n", widget->text); + printf("Selected item: %s\n", widget->text); return FALSE; } diff --git a/jinete/examples/14win.c b/jinete/examples/14win.c index b0f100590..3485a42b0 100644 --- a/jinete/examples/14win.c +++ b/jinete/examples/14win.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -15,9 +40,11 @@ int main (int argc, char *argv[]) /* Allegro stuff */ allegro_init(); - if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0) < 0) { - allegro_message("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer(); install_keyboard(); diff --git a/jinete/examples/15colbut.c b/jinete/examples/15colbut.c index b0f6491cb..cb13185d4 100644 --- a/jinete/examples/15colbut.c +++ b/jinete/examples/15colbut.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -25,9 +50,11 @@ int main (int argc, char *argv[]) JWidget manager, window1, box1, button1, button2, button3, button4, button5; allegro_init(); - if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer(); install_keyboard(); diff --git a/jinete/examples/16theme.c b/jinete/examples/16theme.c index 6f5f3dbab..2433faaf3 100644 --- a/jinete/examples/16theme.c +++ b/jinete/examples/16theme.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -19,9 +44,11 @@ int main (int argc, char *argv[]) /* Allegro stuff */ allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/17theme.c b/jinete/examples/17theme.c index 25582571a..1338558e0 100644 --- a/jinete/examples/17theme.c +++ b/jinete/examples/17theme.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -24,11 +49,15 @@ int main (int argc, char *argv[]) /* Allegro stuff */ allegro_init (); set_color_depth (16); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - set_color_depth (8); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + set_color_depth (8); + if (set_gfx_mode (GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message ("%s\n", allegro_error); + return 1; + } + } } } install_timer (); diff --git a/jinete/examples/18tips.c b/jinete/examples/18tips.c index bc71c7df4..79f5a6871 100644 --- a/jinete/examples/18tips.c +++ b/jinete/examples/18tips.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -16,9 +41,11 @@ int main (int argc, char *argv[]) JWidget manager, window, box, check1, check2, button1, button2; allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); @@ -132,7 +159,7 @@ static JWidget tip_window_new(const char *text) jwidget_set_align(window, JI_CENTER | JI_MIDDLE); /* remove decorative widgets */ - JI_LIST_FOR_EACH_SAFE(window->children, link, next) + JI_LIST_EACH_SAFE(window->children, link, next) jwidget_free(link->data); jwidget_add_hook(window, JI_WIDGET, tip_window_hook, NULL); diff --git a/jinete/examples/19game.c b/jinete/examples/19game.c index 0ccb5d965..e28d86573 100644 --- a/jinete/examples/19game.c +++ b/jinete/examples/19game.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -28,9 +53,11 @@ int main(int argc, char *argv[]) { /* Allegro stuff */ allegro_init(); - if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer(); install_keyboard(); diff --git a/jinete/examples/20combo.c b/jinete/examples/20combo.c index 5a33d08ff..406e41bb7 100644 --- a/jinete/examples/20combo.c +++ b/jinete/examples/20combo.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -17,9 +42,11 @@ int main (int argc, char *argv[]) /* Allegro stuff */ allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); diff --git a/jinete/examples/21manage.c b/jinete/examples/21manage.c index ee5e3e728..a67b63cc7 100644 --- a/jinete/examples/21manage.c +++ b/jinete/examples/21manage.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -16,57 +41,59 @@ int main (int argc, char *argv[]) /* Allegro stuff */ allegro_init (); - if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { - allegro_message ("%s\n", allegro_error); - return 1; + if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) { + if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { + allegro_message("%s\n", allegro_error); + return 1; + } } install_timer (); install_keyboard (); install_mouse (); /* Jinete initialization */ - manager1 = jmanager_new (); - ji_set_standard_theme (); - manager2 = jmanager_new (); - manager3 = jmanager_new (); + manager1 = jmanager_new(); + ji_set_standard_theme(); + manager2 = jmanager_new(); + manager3 = jmanager_new(); - window1 = jwindow_new ("Window1"); - window2 = jwindow_new ("Window2"); - window3 = jwindow_new ("Window3"); - view2 = jview_new (); - view3 = jview_new (); + window1 = jwindow_new("Window1"); + window2 = jwindow_new("Window2"); + window3 = jwindow_new("Window3"); + view2 = jview_new(); + view3 = jview_new(); - jview_attach (view2, manager2); - jview_attach (view3, manager3); + jview_attach(view2, manager2); + jview_attach(view3, manager3); - jwidget_add_child (window1, view2); - jwidget_add_child (window2, view3); + jwidget_add_child(window1, view2); + jwidget_add_child(window2, view3); - jwindow_remap (window1); - jwindow_remap (window2); - jwindow_remap (window3); + jwindow_remap(window1); + jwindow_remap(window2); + jwindow_remap(window3); - rect = jrect_new (JI_SCREEN_W/2-100, JI_SCREEN_H/2-70, - JI_SCREEN_W/2+100, JI_SCREEN_H/2+70); - jwidget_set_rect (window1, rect); - jrect_free (rect); + rect = jrect_new(JI_SCREEN_W/2-100, JI_SCREEN_H/2-70, + JI_SCREEN_W/2+100, JI_SCREEN_H/2+70); + jwidget_set_rect(window1, rect); + jrect_free(rect); - rect = jrect_new (JI_SCREEN_W/2-90, JI_SCREEN_H/2-50, - JI_SCREEN_W/2+90, JI_SCREEN_H/2+50); - jwidget_set_rect (window2, rect); - jrect_free (rect); + rect = jrect_new(JI_SCREEN_W/2-90, JI_SCREEN_H/2-50, + JI_SCREEN_W/2+90, JI_SCREEN_H/2+50); + jwidget_set_rect(window2, rect); + jrect_free(rect); - rect = jrect_new (JI_SCREEN_W/2-80, JI_SCREEN_H/2-30, - JI_SCREEN_W/2+80, JI_SCREEN_H/2+30); - jwidget_set_rect (window3, rect); - jrect_free (rect); + rect = jrect_new(JI_SCREEN_W/2-80, JI_SCREEN_H/2-30, + JI_SCREEN_W/2+80, JI_SCREEN_H/2+30); + jwidget_set_rect(window3, rect); + jrect_free(rect); - jwindow_open_bg (window1); + jwindow_open_bg(window1); _jmanager_open_window(manager2, window2); _jmanager_open_window(manager3, window3); - jmanager_run (manager1); - jmanager_free (manager1); + jmanager_run(manager1); + jmanager_free(manager1); return 0; } diff --git a/jinete/include/jinete.h b/jinete/include/jinete.h index c0e58a951..27d4baa4e 100644 --- a/jinete/include/jinete.h +++ b/jinete/include/jinete.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_H @@ -34,11 +59,13 @@ #include "jinete/scroll.h" #include "jinete/sep.h" #include "jinete/slider.h" +#include "jinete/stream.h" #include "jinete/system.h" #include "jinete/textbox.h" #include "jinete/theme.h" #include "jinete/view.h" #include "jinete/widget.h" #include "jinete/window.h" +#include "jinete/xml.h" #endif /* JINETE_H */ diff --git a/jinete/include/jinete/accel.h b/jinete/include/jinete/accel.h index f94a43df4..bbf36b232 100644 --- a/jinete/include/jinete/accel.h +++ b/jinete/include/jinete/accel.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_ACCEL_H diff --git a/jinete/include/jinete/alert.h b/jinete/include/jinete/alert.h index 538e43b2e..2b3b1377e 100644 --- a/jinete/include/jinete/alert.h +++ b/jinete/include/jinete/alert.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_ALERT_H diff --git a/jinete/include/jinete/base.h b/jinete/include/jinete/base.h index 35f09d601..4b93aa181 100644 --- a/jinete/include/jinete/base.h +++ b/jinete/include/jinete/base.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_BASE_H @@ -207,10 +232,16 @@ typedef struct jquickmenu *JQuickMenu; typedef struct jlink *JLink; typedef struct jlist *JList; typedef union jmessage *JMessage; +typedef struct jstream *JStream; typedef struct jrect *JRect; typedef struct jregion *JRegion; typedef struct jtheme *JTheme; typedef struct jwidget *JWidget; +typedef struct jxml *JXml; +typedef struct jxmlattr *JXmlAttr; +typedef struct jxmlnode *JXmlNode; +typedef struct jxmlelem *JXmlElem; +typedef struct jxmltext *JXmlText; typedef void (*JFunc) (void *data, void *user_data); typedef int (*JCompareFunc) (const void *a, const void *b); @@ -219,19 +250,19 @@ typedef bool (*JMessageFunc) (JWidget widget, JMessage msg); typedef void (*JDrawFunc) (JWidget widget); /* memory routines */ -void *jmalloc (unsigned long n_bytes); -void *jmalloc0 (unsigned long n_bytes); -void *jrealloc (void *mem, unsigned long n_bytes); -void jfree (void *mem); +void *jmalloc (unsigned long n_bytes); +void *jmalloc0(unsigned long n_bytes); +void *jrealloc(void *mem, unsigned long n_bytes); +void jfree (void *mem); -char *jstrdup (const char *string); +char *jstrdup (const char *string); #define jnew(struct_type, n_structs) \ - ((struct_type *)jmalloc (sizeof (struct_type) * (n_structs))) + ((struct_type *)jmalloc(sizeof (struct_type) * (n_structs))) #define jnew0(struct_type, n_structs) \ - ((struct_type *)jmalloc0 (sizeof (struct_type) * (n_structs))) + ((struct_type *)jmalloc0(sizeof (struct_type) * (n_structs))) #define jrenew(struct_type, mem, n_structs) \ - ((struct_type *)jrealloc ((mem), (sizeof (struct_type) * (n_structs)))) + ((struct_type *)jrealloc((mem), (sizeof (struct_type) * (n_structs)))) JI_END_DECLS diff --git a/jinete/include/jinete/box.h b/jinete/include/jinete/box.h index 1be199f6c..035e2a3c1 100644 --- a/jinete/include/jinete/box.h +++ b/jinete/include/jinete/box.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_BOX_H diff --git a/jinete/include/jinete/button.h b/jinete/include/jinete/button.h index 38d57ab9b..463369d2d 100644 --- a/jinete/include/jinete/button.h +++ b/jinete/include/jinete/button.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_BUTTON_H diff --git a/jinete/include/jinete/clipbrd.h b/jinete/include/jinete/clipbrd.h index 00e2af5e0..8fb05ca52 100644 --- a/jinete/include/jinete/clipbrd.h +++ b/jinete/include/jinete/clipbrd.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_CLIPBRD_H diff --git a/jinete/include/jinete/combobox.h b/jinete/include/jinete/combobox.h index a44a104ff..32d4944b8 100644 --- a/jinete/include/jinete/combobox.h +++ b/jinete/include/jinete/combobox.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_COMBOBOX_H diff --git a/jinete/include/jinete/draw.h b/jinete/include/jinete/draw.h index 2232b573e..cf729cc9a 100644 --- a/jinete/include/jinete/draw.h +++ b/jinete/include/jinete/draw.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_DRAW_H diff --git a/jinete/include/jinete/entry.h b/jinete/include/jinete/entry.h index d359a275c..21c7ed5f5 100644 --- a/jinete/include/jinete/entry.h +++ b/jinete/include/jinete/entry.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_ENTRY_H diff --git a/jinete/include/jinete/file.h b/jinete/include/jinete/file.h index 06331e53a..04d241fe2 100644 --- a/jinete/include/jinete/file.h +++ b/jinete/include/jinete/file.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_FILE_H diff --git a/jinete/include/jinete/filesel.h b/jinete/include/jinete/filesel.h index 3f87466f5..fe8096a12 100644 --- a/jinete/include/jinete/filesel.h +++ b/jinete/include/jinete/filesel.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_FILESEL_H diff --git a/jinete/include/jinete/font.h b/jinete/include/jinete/font.h index 7bb74b8af..92e65f6dc 100644 --- a/jinete/include/jinete/font.h +++ b/jinete/include/jinete/font.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_FONT_H diff --git a/jinete/include/jinete/hook.h b/jinete/include/jinete/hook.h index 419e03d9b..11215767c 100644 --- a/jinete/include/jinete/hook.h +++ b/jinete/include/jinete/hook.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_HOOK_H diff --git a/jinete/include/jinete/image.h b/jinete/include/jinete/image.h index 6a0450d8d..f6252de5b 100644 --- a/jinete/include/jinete/image.h +++ b/jinete/include/jinete/image.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_IMAGE_H @@ -13,7 +38,7 @@ JI_BEGIN_DECLS struct BITMAP; -JWidget ji_image_new(struct BITMAP *bmp, int align); +JWidget jimage_new(struct BITMAP *bmp, int align); JI_END_DECLS diff --git a/jinete/include/jinete/intern.h b/jinete/include/jinete/intern.h index bc5b00f11..38d2b70d0 100644 --- a/jinete/include/jinete/intern.h +++ b/jinete/include/jinete/intern.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_LOW_H diff --git a/jinete/include/jinete/label.h b/jinete/include/jinete/label.h index 25c57f369..05e3d6830 100644 --- a/jinete/include/jinete/label.h +++ b/jinete/include/jinete/label.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_LABEL_H diff --git a/jinete/include/jinete/list.h b/jinete/include/jinete/list.h index f455f8ed1..9f3091ed2 100644 --- a/jinete/include/jinete/list.h +++ b/jinete/include/jinete/list.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_LIST_H @@ -49,7 +74,7 @@ JLink jlist_find(JList list, const void *data); #define jlist_first_data(list) (jlist_first(list)->data) #define jlist_last_data(list) (jlist_last(list)->data) -#define jlist_empty(list) (!((JList)(list))->length) +#define jlist_empty(list) (((JList)(list))->length == 0) #define JI_LIST_FOR_EACH(list, link) \ for (link=((JList)(list))->end->next; \ @@ -61,6 +86,10 @@ JLink jlist_find(JList list, const void *data); link!=((JList)(list))->end; \ link=link->prev) +/** + * Iterator for each item of the list (the body of the "for" can be + * remove elements in the list). + */ #define JI_LIST_FOR_EACH_SAFE(list, link, next) \ for (link=((JList)(list))->end->next, next=link->next; \ link!=((JList)(list))->end; \ diff --git a/jinete/include/jinete/listbox.h b/jinete/include/jinete/listbox.h index cf4bb8768..596d445b6 100644 --- a/jinete/include/jinete/listbox.h +++ b/jinete/include/jinete/listbox.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_LISTBOX_H diff --git a/jinete/include/jinete/manager.h b/jinete/include/jinete/manager.h index eb90e00df..f49f7bddd 100644 --- a/jinete/include/jinete/manager.h +++ b/jinete/include/jinete/manager.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_MANAGER_H diff --git a/jinete/include/jinete/menu.h b/jinete/include/jinete/menu.h index fbb8533e4..1ae8a8c25 100644 --- a/jinete/include/jinete/menu.h +++ b/jinete/include/jinete/menu.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_MENU_H diff --git a/jinete/include/jinete/message.h b/jinete/include/jinete/message.h index 0773452d1..2596dd36e 100644 --- a/jinete/include/jinete/message.h +++ b/jinete/include/jinete/message.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_MSG_H diff --git a/jinete/include/jinete/panel.h b/jinete/include/jinete/panel.h index b676d9a09..b81d127a9 100644 --- a/jinete/include/jinete/panel.h +++ b/jinete/include/jinete/panel.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_PANEL_H @@ -11,10 +36,10 @@ JI_BEGIN_DECLS -JWidget ji_panel_new(int align); +JWidget jpanel_new(int align); -double ji_panel_get_pos(JWidget panel); -void ji_panel_set_pos(JWidget panel, double pos); +double jpanel_get_pos(JWidget panel); +void jpanel_set_pos(JWidget panel, double pos); JI_END_DECLS diff --git a/jinete/include/jinete/qckmenu.h b/jinete/include/jinete/qckmenu.h index db5353558..f73a51f45 100644 --- a/jinete/include/jinete/qckmenu.h +++ b/jinete/include/jinete/qckmenu.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_QCKMENU_H diff --git a/jinete/include/jinete/rect.h b/jinete/include/jinete/rect.h index 202b2419b..82e535e98 100644 --- a/jinete/include/jinete/rect.h +++ b/jinete/include/jinete/rect.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_RECT_H diff --git a/jinete/include/jinete/region.h b/jinete/include/jinete/region.h index b0a24cf23..2503fa98b 100644 --- a/jinete/include/jinete/region.h +++ b/jinete/include/jinete/region.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_REGION_H diff --git a/jinete/include/jinete/scroll.h b/jinete/include/jinete/scroll.h index b5dde2ab1..b6585ccd9 100644 --- a/jinete/include/jinete/scroll.h +++ b/jinete/include/jinete/scroll.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_SCROLL_H diff --git a/jinete/include/jinete/sep.h b/jinete/include/jinete/sep.h index 4d05589a2..c09b66a29 100644 --- a/jinete/include/jinete/sep.h +++ b/jinete/include/jinete/sep.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_SEP_H diff --git a/jinete/include/jinete/slider.h b/jinete/include/jinete/slider.h index 0a12f607d..b4b427c8b 100644 --- a/jinete/include/jinete/slider.h +++ b/jinete/include/jinete/slider.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_SLIDER_H diff --git a/jinete/include/jinete/system.h b/jinete/include/jinete/system.h index d06045955..3647e1c95 100644 --- a/jinete/include/jinete/system.h +++ b/jinete/include/jinete/system.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_SYSTEM_H diff --git a/jinete/include/jinete/textbox.h b/jinete/include/jinete/textbox.h index b0bb2f527..41f00e5cc 100644 --- a/jinete/include/jinete/textbox.h +++ b/jinete/include/jinete/textbox.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_TEXTBOX_H diff --git a/jinete/include/jinete/theme.h b/jinete/include/jinete/theme.h index 317786d85..f0d4c99f1 100644 --- a/jinete/include/jinete/theme.h +++ b/jinete/include/jinete/theme.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_THEME_H diff --git a/jinete/include/jinete/view.h b/jinete/include/jinete/view.h index 04c297128..b8c7919e8 100644 --- a/jinete/include/jinete/view.h +++ b/jinete/include/jinete/view.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_VIEW_H diff --git a/jinete/include/jinete/widget.h b/jinete/include/jinete/widget.h index 18ffd96b4..19fcc62e3 100644 --- a/jinete/include/jinete/widget.h +++ b/jinete/include/jinete/widget.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_WIDGET_H diff --git a/jinete/include/jinete/window.h b/jinete/include/jinete/window.h index 445a8f85f..340ba57b8 100644 --- a/jinete/include/jinete/window.h +++ b/jinete/include/jinete/window.h @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef JINETE_WINDOW_H diff --git a/jinete/makefile.lst b/jinete/makefile.lst index 362d139e5..20351b39f 100644 --- a/jinete/makefile.lst +++ b/jinete/makefile.lst @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2005 by David A. Capello -*-Makefile-*- +# Copyright (C) 2001-2005, 2007 by David A. Capello -*-Makefile-*- ifndef JINETE_DIR JINETE_DIR = . @@ -46,12 +46,14 @@ JINETE_SOURCES = \ $(JINETE_DIR)/src/jregion.c \ $(JINETE_DIR)/src/jsep.c \ $(JINETE_DIR)/src/jslider.c \ + $(JINETE_DIR)/src/jstream.c \ $(JINETE_DIR)/src/jsystem.c \ $(JINETE_DIR)/src/jtextbox.c \ $(JINETE_DIR)/src/jtheme.c \ $(JINETE_DIR)/src/jview.c \ $(JINETE_DIR)/src/jwidget.c \ $(JINETE_DIR)/src/jwindow.c \ + $(JINETE_DIR)/src/jxml.c \ $(JINETE_DIR)/src/themes/jsimple.c \ $(JINETE_DIR)/src/themes/jstand.c @@ -107,13 +109,11 @@ JINETE_EXAMPLES_SOURCES = \ $(JINETE_DIR)/examples/18tips.c \ $(JINETE_DIR)/examples/19game.c \ $(JINETE_DIR)/examples/20combo.c \ - $(JINETE_DIR)/examples/21manage.c + $(JINETE_DIR)/examples/21manage.c \ + $(JINETE_DIR)/examples/22xml.c -JINETE_EXAMPLES_SOURCES =\ - $(JINETE_DIR)/examples/09lists.c -# $(JINETE_DIR)/examples/16theme.c\ -# $(JINETE_DIR)/examples/17theme.c\ -# $(JINETE_DIR)/examples/20combo.c +JINETE_EXAMPLES_SOURCES = \ + $(JINETE_DIR)/examples/22xml.c JINETE_EXAMPLES_OBJS = \ $(addprefix $(OBJ_DIR)/, \ diff --git a/jinete/src/jaccel.c b/jinete/src/jaccel.c index 6e0c74a14..df1814b5c 100644 --- a/jinete/src/jaccel.c +++ b/jinete/src/jaccel.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jalert.c b/jinete/src/jalert.c index ea84205fd..bca3235c5 100644 --- a/jinete/src/jalert.c +++ b/jinete/src/jalert.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*********************************************************************** diff --git a/jinete/src/jbox.c b/jinete/src/jbox.c index 7b5ff7036..d68bedd1b 100644 --- a/jinete/src/jbox.c +++ b/jinete/src/jbox.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Based on code from GTK+ 2.1.2 (gtk+/gtk/gtkhbox.c) */ diff --git a/jinete/src/jbutton.c b/jinete/src/jbutton.c index 1df65176f..e102c779e 100644 --- a/jinete/src/jbutton.c +++ b/jinete/src/jbutton.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -139,7 +164,7 @@ void jbutton_get_bevel(JWidget widget, int *b4) } void jbutton_add_command(JWidget widget, - void (*command_proc)(JWidget widget)) + void (*command_proc)(JWidget widget)) { Button *button = jwidget_get_data(widget, widget->type); ButtonCommand *command = jnew(ButtonCommand, 1); @@ -152,9 +177,9 @@ void jbutton_add_command(JWidget widget, } void jbutton_add_command_data(JWidget widget, - void (*command_proc)(JWidget widget, - void *data), - void *data) + void (*command_proc)(JWidget widget, + void *data), + void *data) { Button *button = jwidget_get_data(widget, widget->type); ButtonCommand *command = jnew(ButtonCommand, 1); diff --git a/jinete/src/jclipbrd.c b/jinete/src/jclipbrd.c index 169dec9b2..b909c4a56 100644 --- a/jinete/src/jclipbrd.c +++ b/jinete/src/jclipbrd.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "jinete/base.h" diff --git a/jinete/src/jcombox.c b/jinete/src/jcombox.c index aa2bd9b27..c32161255 100644 --- a/jinete/src/jcombox.c +++ b/jinete/src/jcombox.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jdraw.c b/jinete/src/jdraw.c index 1196dc4a5..e14964a96 100644 --- a/jinete/src/jdraw.c +++ b/jinete/src/jdraw.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jentry.c b/jinete/src/jentry.c index 03be23520..c127cc4f4 100644 --- a/jinete/src/jentry.c +++ b/jinete/src/jentry.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jfile.c b/jinete/src/jfile.c index 386ecb4a0..d2725e8b6 100644 --- a/jinete/src/jfile.c +++ b/jinete/src/jfile.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -187,8 +212,8 @@ static JWidget convert_tag_to_widget(Tag *tag) Attr *horizontal = tag_get_attr(tag, "horizontal"); Attr *vertical = tag_get_attr(tag, "vertical"); - widget = ji_panel_new(horizontal ? JI_HORIZONTAL: - vertical ? JI_VERTICAL: 0); + widget = jpanel_new(horizontal ? JI_HORIZONTAL: + vertical ? JI_VERTICAL: 0); } /* radio */ else if (strcmp(tag->name, "radio") == 0) { @@ -483,24 +508,25 @@ static Tag *tag_new(const char *name) return tag; } -static Tag *tag_new_from_string (char *tag_string) +static Tag *tag_new_from_string(char *tag_string) { char c, *s; Tag *tag; /* find the end of the tag-name */ - for (s=tag_string; *s && !IS_BLANK (*s); s++); + for (s=tag_string; *s && !IS_BLANK (*s); s++) + ; /* create the new tag with the found name */ c = *s; *s = 0; - tag = tag_new (tag_string); + tag = tag_new(tag_string); *s = c; /* continue reading attributes */ while (*s) { /* jump white spaces */ - while (*s && IS_BLANK (*s)) + while (*s && IS_BLANK(*s)) s++; /* isn't end of string? */ @@ -512,7 +538,7 @@ static Tag *tag_new_from_string (char *tag_string) Attr *attr; /* read the attribute-name */ - while (*s && !IS_BLANK (*s) && *s != '=') + while (*s && !IS_BLANK(*s) && *s != '=') s++; c = *s; @@ -548,7 +574,7 @@ static Tag *tag_new_from_string (char *tag_string) } else { /* read the attribute-value */ - while (*s && !IS_BLANK (*s)) + while (*s && !IS_BLANK(*s)) s++; } diff --git a/jinete/src/jfilesel.c b/jinete/src/jfilesel.c index 0b0b526f9..0842099c7 100644 --- a/jinete/src/jfilesel.c +++ b/jinete/src/jfilesel.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -103,16 +128,16 @@ char *ji_file_select_ex(const char *message, ustrcpy (buf, init_path); window = jwindow_new (message); - box1 = jbox_new (JI_VERTICAL); - box2 = jbox_new (JI_HORIZONTAL); - box3 = jbox_new (JI_HORIZONTAL | JI_HOMOGENEOUS); - panel = ji_panel_new (JI_HORIZONTAL); - view1 = jview_new (); - view2 = jview_new (); - listbox1 = jlistbox_new (); - listbox2 = jlistbox_new (); - button_select = jbutton_new (ji_translate_string ("&OK")); - button_cancel = jbutton_new (ji_translate_string ("&Cancel")); + box1 = jbox_new(JI_VERTICAL); + box2 = jbox_new(JI_HORIZONTAL); + box3 = jbox_new(JI_HORIZONTAL | JI_HOMOGENEOUS); + panel = jpanel_new(JI_HORIZONTAL); + view1 = jview_new(); + view2 = jview_new(); + listbox1 = jlistbox_new(); + listbox2 = jlistbox_new(); + button_select = jbutton_new(ji_translate_string("&OK")); + button_cancel = jbutton_new(ji_translate_string("&Cancel")); /* create input widget (entry_path) */ entry_path = NULL; diff --git a/jinete/src/jfont.c b/jinete/src/jfont.c index 5367a5048..aea201ee8 100644 --- a/jinete/src/jfont.c +++ b/jinete/src/jfont.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Based on code of AllegroFont, Copyright (c) 2001, 2002 Javier Gonzalez */ diff --git a/jinete/src/jfontbmp.c b/jinete/src/jfontbmp.c index 99ee34bf5..be32a3db2 100644 --- a/jinete/src/jfontbmp.c +++ b/jinete/src/jfontbmp.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Original code from: diff --git a/jinete/src/jhook.c b/jinete/src/jhook.c index fbc58316f..e32c7bd62 100644 --- a/jinete/src/jhook.c +++ b/jinete/src/jhook.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "jinete/hook.h" diff --git a/jinete/src/jimage.c b/jinete/src/jimage.c index 3203c41df..c64f9f0b8 100644 --- a/jinete/src/jimage.c +++ b/jinete/src/jimage.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -16,27 +41,27 @@ static bool image_msg_proc (JWidget widget, JMessage msg); -JWidget ji_image_new (BITMAP *bmp, int align) +JWidget jimage_new(BITMAP *bmp, int align) { - JWidget widget = jwidget_new (JI_IMAGE); + JWidget widget = jwidget_new(JI_IMAGE); - jwidget_add_hook (widget, JI_IMAGE, image_msg_proc, bmp); - jwidget_set_align (widget, align); + jwidget_add_hook(widget, JI_IMAGE, image_msg_proc, bmp); + jwidget_set_align(widget, align); return widget; } -static bool image_msg_proc (JWidget widget, JMessage msg) +static bool image_msg_proc(JWidget widget, JMessage msg) { switch (msg->type) { case JM_REQSIZE: { - BITMAP *bmp = jwidget_get_data (widget, JI_IMAGE); + BITMAP *bmp = jwidget_get_data(widget, JI_IMAGE); struct jrect box, text, icon; - jwidget_get_texticon_info (widget, &box, &text, &icon, - jwidget_get_align (widget), - bmp->w, bmp->h); + jwidget_get_texticon_info(widget, &box, &text, &icon, + jwidget_get_align (widget), + bmp->w, bmp->h); msg->reqsize.w = widget->border_width.l + jrect_w(&box) + widget->border_width.r; msg->reqsize.h = widget->border_width.t + jrect_h(&box) + widget->border_width.b; @@ -44,18 +69,18 @@ static bool image_msg_proc (JWidget widget, JMessage msg) } case JM_DRAW: { - BITMAP *bmp = jwidget_get_data (widget, JI_IMAGE); + BITMAP *bmp = jwidget_get_data(widget, JI_IMAGE); struct jrect box, text, icon; - jwidget_get_texticon_info (widget, &box, &text, &icon, - jwidget_get_align (widget), - bmp->w, bmp->h); + jwidget_get_texticon_info(widget, &box, &text, &icon, + jwidget_get_align (widget), + bmp->w, bmp->h); jdraw_rectexclude(widget->rc, &icon, jwidget_get_bg_color(widget)); - blit (bmp, ji_screen, 0, 0, - icon.x1, icon.y1, jrect_w(&icon), jrect_h(&icon)); + blit(bmp, ji_screen, 0, 0, + icon.x1, icon.y1, jrect_w(&icon), jrect_h(&icon)); return TRUE; } } diff --git a/jinete/src/jintern.c b/jinete/src/jintern.c index c6a443175..cc019c040 100644 --- a/jinete/src/jintern.c +++ b/jinete/src/jintern.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "jinete/manager.h" diff --git a/jinete/src/jlabel.c b/jinete/src/jlabel.c index 366b339fc..be207fa10 100644 --- a/jinete/src/jlabel.c +++ b/jinete/src/jlabel.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "jinete/message.h" diff --git a/jinete/src/jlist.c b/jinete/src/jlist.c index 1c765359d..910b053a8 100644 --- a/jinete/src/jlist.c +++ b/jinete/src/jlist.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* #define USE_JUNKLIST */ diff --git a/jinete/src/jlistbox.c b/jinete/src/jlistbox.c index 17dd4292c..e2f75853f 100644 --- a/jinete/src/jlistbox.c +++ b/jinete/src/jlistbox.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jmanager.c b/jinete/src/jmanager.c index 4ae4c40ba..45145203c 100644 --- a/jinete/src/jmanager.c +++ b/jinete/src/jmanager.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* #define REPORT_EVENTS */ diff --git a/jinete/src/jmem.c b/jinete/src/jmem.c index 55423a824..3f51ddfa2 100644 --- a/jinete/src/jmem.c +++ b/jinete/src/jmem.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jmenu.c b/jinete/src/jmenu.c index 7ed7d1e82..a9cc5f1ef 100644 --- a/jinete/src/jmenu.c +++ b/jinete/src/jmenu.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -1098,7 +1123,7 @@ static JWidget pick_menuitem(JWidget *_menubox, JWidget *open_menubox) if (MOUSE_IN(menubox->rc)) { *_menubox = menubox; picked = jwidget_pick(MBOX(menubox)->menu, - ji_mouse_x(0), ji_mouse_y(0)); + ji_mouse_x(0), ji_mouse_y(0)); if (picked->type != JI_MENUITEM) picked = NULL; break; @@ -1150,7 +1175,7 @@ static JWidget find_previtem(JWidget menu, JWidget menuitem) for (; link != menu->children->end; link=link->prev) { nextitem = (JWidget)link->data; - if ((nextitem->type == JI_MENUITEM) && jwidget_is_enabled (nextitem)) + if ((nextitem->type == JI_MENUITEM) && jwidget_is_enabled(nextitem)) return nextitem; } diff --git a/jinete/src/jmessage.c b/jinete/src/jmessage.c index 12bf506a5..6eb48362b 100644 --- a/jinete/src/jmessage.c +++ b/jinete/src/jmessage.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jpanel.c b/jinete/src/jpanel.c index 05a162404..8e8670c54 100644 --- a/jinete/src/jpanel.c +++ b/jinete/src/jpanel.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "jinete/list.h" @@ -20,7 +45,7 @@ static bool panel_msg_proc(JWidget widget, JMessage msg); static void panel_request_size(JWidget widget, int *w, int *h); static void panel_set_position(JWidget widget, JRect rect); -JWidget ji_panel_new(int align) +JWidget jpanel_new(int align) { JWidget widget = jwidget_new(JI_PANEL); Panel *panel = jnew(Panel, 1); @@ -35,14 +60,14 @@ JWidget ji_panel_new(int align) return widget; } -double ji_panel_get_pos(JWidget widget) +double jpanel_get_pos(JWidget widget) { Panel *panel = jwidget_get_data(widget, JI_PANEL); return panel->pos; } -void ji_panel_set_pos(JWidget widget, double pos) +void jpanel_set_pos(JWidget widget, double pos) { Panel *panel = jwidget_get_data(widget, JI_PANEL); @@ -133,7 +158,7 @@ static bool panel_msg_proc(JWidget widget, JMessage msg) 100.0 * (msg->mouse.y-widget->rc->y1) / jrect_h(widget->rc); } - panel->pos = MID (0, panel->pos, 100); + panel->pos = MID(0, panel->pos, 100); jwidget_set_rect(widget, widget->rc); jwidget_dirty(widget); diff --git a/jinete/src/jqckmenu.c b/jinete/src/jqckmenu.c index 85a45ed8e..b68e096fc 100644 --- a/jinete/src/jqckmenu.c +++ b/jinete/src/jqckmenu.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "jinete/accel.h" @@ -79,9 +104,9 @@ static void process_quickmenu(JWidget menu, JQuickMenu quick_menu) menuitem = jmenuitem_new (quick_menu[c].text); if (quick_menu[c].accel) { - JAccel accel = jaccel_new (); - jaccel_add_keys_from_string (accel, quick_menu[c].accel); - jmenuitem_set_accel (menuitem, accel); + JAccel accel = jaccel_new(); + jaccel_add_keys_from_string(accel, quick_menu[c].accel); + jmenuitem_set_accel(menuitem, accel); } if (quick_menu[c].quick_handler) { diff --git a/jinete/src/jrect.c b/jinete/src/jrect.c index 1517bae98..a37390cd9 100644 --- a/jinete/src/jrect.c +++ b/jinete/src/jrect.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "jinete/rect.h" diff --git a/jinete/src/jsep.c b/jinete/src/jsep.c index 24e18900c..218954ed7 100644 --- a/jinete/src/jsep.c +++ b/jinete/src/jsep.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "jinete/list.h" diff --git a/jinete/src/jslider.c b/jinete/src/jslider.c index 4f13fa19e..183195aca 100644 --- a/jinete/src/jslider.c +++ b/jinete/src/jslider.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jsystem.c b/jinete/src/jsystem.c index 2debe8573..c8f66f8a2 100644 --- a/jinete/src/jsystem.c +++ b/jinete/src/jsystem.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jtextbox.c b/jinete/src/jtextbox.c index ce9e0e3f6..c9734242b 100644 --- a/jinete/src/jtextbox.c +++ b/jinete/src/jtextbox.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include @@ -17,24 +42,24 @@ #include "jinete/view.h" #include "jinete/widget.h" -static bool textbox_msg_proc (JWidget widget, JMessage msg); -static void textbox_request_size (JWidget widget, int *w, int *h); +static bool textbox_msg_proc(JWidget widget, JMessage msg); +static void textbox_request_size(JWidget widget, int *w, int *h); -JWidget jtextbox_new (const char *text, int align) +JWidget jtextbox_new(const char *text, int align) { - JWidget widget = jwidget_new (JI_TEXTBOX); + JWidget widget = jwidget_new(JI_TEXTBOX); - jwidget_add_hook (widget, JI_TEXTBOX, textbox_msg_proc, NULL); - jwidget_focusrest (widget, TRUE); - jwidget_set_align (widget, align); - jwidget_set_text (widget, text); + jwidget_add_hook(widget, JI_TEXTBOX, textbox_msg_proc, NULL); + jwidget_focusrest(widget, TRUE); + jwidget_set_align(widget, align); + jwidget_set_text(widget, text); - jwidget_init_theme (widget); + jwidget_init_theme(widget); return widget; } -static bool textbox_msg_proc (JWidget widget, JMessage msg) +static bool textbox_msg_proc(JWidget widget, JMessage msg) { switch (msg->type) { @@ -44,117 +69,117 @@ static bool textbox_msg_proc (JWidget widget, JMessage msg) case JM_SIGNAL: if (msg->signal.num == JI_SIGNAL_SET_TEXT) { - JWidget view = jwidget_get_view (widget); + JWidget view = jwidget_get_view(widget); if (view) - jview_update (view); + jview_update(view); } break; case JM_CHAR: - if (jwidget_has_focus (widget)) { - JWidget view = jwidget_get_view (widget); + if (jwidget_has_focus(widget)) { + JWidget view = jwidget_get_view(widget); if (view) { - JRect vp = jview_get_viewport_position (view); - int textheight = jwidget_get_text_height (widget); + JRect vp = jview_get_viewport_position(view); + int textheight = jwidget_get_text_height(widget); int scroll_x, scroll_y; - jview_get_scroll (view, &scroll_x, &scroll_y); + jview_get_scroll(view, &scroll_x, &scroll_y); switch (msg->key.scancode) { case KEY_LEFT: - jview_set_scroll (view, scroll_x-jrect_w(vp)/2, scroll_y); + jview_set_scroll(view, scroll_x-jrect_w(vp)/2, scroll_y); break; case KEY_RIGHT: - jview_set_scroll (view, scroll_x+jrect_w(vp)/2, scroll_y); + jview_set_scroll(view, scroll_x+jrect_w(vp)/2, scroll_y); break; case KEY_UP: - jview_set_scroll (view, scroll_x, scroll_y-jrect_h(vp)/2); + jview_set_scroll(view, scroll_x, scroll_y-jrect_h(vp)/2); break; case KEY_DOWN: - jview_set_scroll (view, scroll_x, scroll_y+jrect_h(vp)/2); + jview_set_scroll(view, scroll_x, scroll_y+jrect_h(vp)/2); break; case KEY_PGUP: - jview_set_scroll (view, scroll_x, - scroll_y-(jrect_h(vp)-textheight)); + jview_set_scroll(view, scroll_x, + scroll_y-(jrect_h(vp)-textheight)); break; case KEY_PGDN: - jview_set_scroll (view, scroll_x, - scroll_y+(jrect_h(vp)-textheight)); + jview_set_scroll(view, scroll_x, + scroll_y+(jrect_h(vp)-textheight)); break; case KEY_HOME: - jview_set_scroll (view, scroll_x, 0); + jview_set_scroll(view, scroll_x, 0); break; case KEY_END: - jview_set_scroll (view, scroll_x, - jrect_h(widget->rc) - jrect_h(vp)); + jview_set_scroll(view, scroll_x, + jrect_h(widget->rc) - jrect_h(vp)); break; default: jrect_free (vp); return FALSE; } - jrect_free (vp); + jrect_free(vp); } return TRUE; } break; case JM_BUTTONPRESSED: { - JWidget view = jwidget_get_view (widget); + JWidget view = jwidget_get_view(widget); if (view) { - jwidget_hard_capture_mouse (widget); - ji_mouse_set_cursor (JI_CURSOR_MOVE); + jwidget_hard_capture_mouse(widget); + ji_mouse_set_cursor(JI_CURSOR_MOVE); return TRUE; } break; } case JM_MOTION: { - JWidget view = jwidget_get_view (widget); - if (view && jwidget_has_capture (widget)) { - JRect vp = jview_get_viewport_position (view); + JWidget view = jwidget_get_view(widget); + if (view && jwidget_has_capture(widget)) { + JRect vp = jview_get_viewport_position(view); int scroll_x, scroll_y; - jview_get_scroll (view, &scroll_x, &scroll_y); - jview_set_scroll (view, - scroll_x + ji_mouse_x (1) - ji_mouse_x (0), - scroll_y + ji_mouse_y (1) - ji_mouse_y (0)); + jview_get_scroll(view, &scroll_x, &scroll_y); + jview_set_scroll(view, + scroll_x + ji_mouse_x(1) - ji_mouse_x(0), + scroll_y + ji_mouse_y(1) - ji_mouse_y(0)); - ji_mouse_control_infinite_scroll (vp); - jrect_free (vp); + ji_mouse_control_infinite_scroll(vp); + jrect_free(vp); } break; } case JM_BUTTONRELEASED: { - JWidget view = jwidget_get_view (widget); - if (view && jwidget_has_capture (widget)) { - jwidget_release_mouse (widget); - ji_mouse_set_cursor (JI_CURSOR_NORMAL); + JWidget view = jwidget_get_view(widget); + if (view && jwidget_has_capture(widget)) { + jwidget_release_mouse(widget); + ji_mouse_set_cursor(JI_CURSOR_NORMAL); return TRUE; } break; } case JM_WHEEL: { - JWidget view = jwidget_get_view (widget); + JWidget view = jwidget_get_view(widget); if (view) { int scroll_x, scroll_y; jview_get_scroll(view, &scroll_x, &scroll_y); jview_set_scroll(view, - scroll_x, - scroll_y + - (ji_mouse_z (1) - ji_mouse_z (0)) - *jwidget_get_text_height(widget)*3); + scroll_x, + scroll_y + + (ji_mouse_z(1) - ji_mouse_z(0)) + *jwidget_get_text_height(widget)*3); } break; } @@ -163,7 +188,7 @@ static bool textbox_msg_proc (JWidget widget, JMessage msg) return FALSE; } -static void textbox_request_size (JWidget widget, int *w, int *h) +static void textbox_request_size(JWidget widget, int *w, int *h) { /* XXX */ /* *w = widget->border_width.l + widget->border_width.r; */ @@ -171,23 +196,23 @@ static void textbox_request_size (JWidget widget, int *w, int *h) *w = 0; *h = 0; - _ji_theme_textbox_draw (NULL, widget, w, h); + _ji_theme_textbox_draw(NULL, widget, w, h); if (widget->align & JI_WORDWRAP) { - JWidget view = jwidget_get_view (widget); + JWidget view = jwidget_get_view(widget); int width, min = *w; if (view) { - JRect vp = jview_get_viewport_position (view); + JRect vp = jview_get_viewport_position(view); width = jrect_w(vp); - jrect_free (vp); + jrect_free(vp); } else { width = jrect_w(widget->rc); } - *w = MAX (min, width); - _ji_theme_textbox_draw (NULL, widget, w, h); + *w = MAX(min, width); + _ji_theme_textbox_draw(NULL, widget, w, h); *w = min; } diff --git a/jinete/src/jtheme.c b/jinete/src/jtheme.c index 6028de54f..2f949ddaf 100644 --- a/jinete/src/jtheme.c +++ b/jinete/src/jtheme.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/jview.c b/jinete/src/jview.c index 9c846da1c..aa8c688ef 100644 --- a/jinete/src/jview.c +++ b/jinete/src/jview.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "jinete/intern.h" diff --git a/jinete/src/jwidget.c b/jinete/src/jwidget.c index 0e993b5ac..e026f6498 100644 --- a/jinete/src/jwidget.c +++ b/jinete/src/jwidget.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* #define REPORT_SIGNALS */ @@ -26,7 +51,7 @@ int ji_register_widget_type (void) } /* creates a new widget with an unique JID */ -JWidget jwidget_new (int type) +JWidget jwidget_new(int type) { JWidget widget = _ji_get_new_widget(); if (!widget) @@ -75,7 +100,7 @@ JWidget jwidget_new (int type) return widget; } -void jwidget_free (JWidget widget) +void jwidget_free(JWidget widget) { JLink link, next; JMessage msg; @@ -208,28 +233,28 @@ int jwidget_get_type(JWidget widget) return widget->type; } -const char *jwidget_get_name (JWidget widget) +const char *jwidget_get_name(JWidget widget) { return widget->name; } -const char *jwidget_get_text (JWidget widget) +const char *jwidget_get_text(JWidget widget) { jwidget_emit_signal(widget, JI_SIGNAL_GET_TEXT); return widget->text; } -int jwidget_get_align (JWidget widget) +int jwidget_get_align(JWidget widget) { return widget->align; } -FONT *jwidget_get_font (JWidget widget) +FONT *jwidget_get_font(JWidget widget) { return widget->text_font; } -void jwidget_set_name (JWidget widget, const char *name) +void jwidget_set_name(JWidget widget, const char *name) { if (widget->name) jfree (widget->name); @@ -237,7 +262,7 @@ void jwidget_set_name (JWidget widget, const char *name) widget->name = name ? jstrdup (name) : NULL; } -void jwidget_set_text (JWidget widget, const char *text) +void jwidget_set_text(JWidget widget, const char *text) { if (text) { /* more space needed */ @@ -264,14 +289,14 @@ void jwidget_set_text (JWidget widget, const char *text) } } -void jwidget_set_align (JWidget widget, int align) +void jwidget_set_align(JWidget widget, int align) { widget->align = align; jwidget_dirty (widget); } -void jwidget_set_font (JWidget widget, FONT *font) +void jwidget_set_font(JWidget widget, FONT *font) { widget->text_font = font; @@ -288,7 +313,7 @@ void jwidget_set_font (JWidget widget, FONT *font) /**********************************************************************/ /* behavior properties */ -void jwidget_magnetic (JWidget widget, bool state) +void jwidget_magnetic(JWidget widget, bool state) { if (state) widget->flags |= JI_MAGNETIC; @@ -296,7 +321,7 @@ void jwidget_magnetic (JWidget widget, bool state) widget->flags &= ~JI_MAGNETIC; } -void jwidget_expansive (JWidget widget, bool state) +void jwidget_expansive(JWidget widget, bool state) { if (state) widget->flags |= JI_EXPANSIVE; @@ -304,7 +329,7 @@ void jwidget_expansive (JWidget widget, bool state) widget->flags &= ~JI_EXPANSIVE; } -void jwidget_decorative (JWidget widget, bool state) +void jwidget_decorative(JWidget widget, bool state) { if (state) widget->flags |= JI_DECORATIVE; @@ -312,7 +337,7 @@ void jwidget_decorative (JWidget widget, bool state) widget->flags &= ~JI_DECORATIVE; } -void jwidget_autodestroy (JWidget widget, bool state) +void jwidget_autodestroy(JWidget widget, bool state) { JLink link; @@ -325,7 +350,7 @@ void jwidget_autodestroy (JWidget widget, bool state) jwidget_autodestroy(link->data, state); } -void jwidget_focusrest (JWidget widget, bool state) +void jwidget_focusrest(JWidget widget, bool state) { if (state) widget->flags |= JI_FOCUSREST; @@ -333,27 +358,27 @@ void jwidget_focusrest (JWidget widget, bool state) widget->flags &= ~JI_FOCUSREST; } -bool jwidget_is_magnetic (JWidget widget) +bool jwidget_is_magnetic(JWidget widget) { return (widget->flags & JI_MAGNETIC) ? TRUE: FALSE; } -bool jwidget_is_expansive (JWidget widget) +bool jwidget_is_expansive(JWidget widget) { return (widget->flags & JI_EXPANSIVE) ? TRUE: FALSE; } -bool jwidget_is_decorative (JWidget widget) +bool jwidget_is_decorative(JWidget widget) { return (widget->flags & JI_DECORATIVE) ? TRUE: FALSE; } -bool jwidget_is_autodestroy (JWidget widget) +bool jwidget_is_autodestroy(JWidget widget) { return (widget->flags & JI_AUTODESTROY) ? TRUE: FALSE; } -bool jwidget_is_focusrest (JWidget widget) +bool jwidget_is_focusrest(JWidget widget) { return (widget->flags & JI_FOCUSREST) ? TRUE: FALSE; } @@ -361,7 +386,7 @@ bool jwidget_is_focusrest (JWidget widget) /**********************************************************************/ /* status properties */ -void jwidget_dirty (JWidget widget) +void jwidget_dirty(JWidget widget) { #if 0 /* is visible? */ @@ -383,7 +408,7 @@ void jwidget_dirty (JWidget widget) #endif } -void jwidget_show (JWidget widget) +void jwidget_show(JWidget widget) { if (widget->flags & JI_HIDDEN) { widget->flags &= ~JI_HIDDEN; @@ -393,7 +418,7 @@ void jwidget_show (JWidget widget) } } -void jwidget_hide (JWidget widget) +void jwidget_hide(JWidget widget) { if (!(widget->flags & JI_HIDDEN)) { jmanager_free_widget (widget); /* free from mananger */ @@ -403,7 +428,7 @@ void jwidget_hide (JWidget widget) } } -void jwidget_enable (JWidget widget) +void jwidget_enable(JWidget widget) { if (widget->flags & JI_DISABLED) { widget->flags &= ~JI_DISABLED; @@ -413,7 +438,7 @@ void jwidget_enable (JWidget widget) } } -void jwidget_disable (JWidget widget) +void jwidget_disable(JWidget widget) { if (!(widget->flags & JI_DISABLED)) { jmanager_free_widget (widget); /* free from the manager */ @@ -425,7 +450,7 @@ void jwidget_disable (JWidget widget) } } -void jwidget_select (JWidget widget) +void jwidget_select(JWidget widget) { if (!(widget->flags & JI_SELECTED)) { widget->flags |= JI_SELECTED; @@ -435,7 +460,7 @@ void jwidget_select (JWidget widget) } } -void jwidget_deselect (JWidget widget) +void jwidget_deselect(JWidget widget) { if (widget->flags & JI_SELECTED) { widget->flags &= ~JI_SELECTED; @@ -492,17 +517,17 @@ bool jwidget_is_deselected(JWidget widget) /**********************************************************************/ /* properties with manager */ -bool jwidget_has_focus (JWidget widget) +bool jwidget_has_focus(JWidget widget) { return (widget->flags & JI_HASFOCUS) ? TRUE: FALSE; } -bool jwidget_has_mouse (JWidget widget) +bool jwidget_has_mouse(JWidget widget) { return (widget->flags & JI_HASMOUSE) ? TRUE: FALSE; } -bool jwidget_has_capture (JWidget widget) +bool jwidget_has_capture(JWidget widget) { return (widget->flags & JI_HASCAPTURE) ? TRUE: FALSE; } @@ -510,7 +535,7 @@ bool jwidget_has_capture (JWidget widget) /**********************************************************************/ /* children handle */ -void jwidget_add_child (JWidget widget, JWidget child) +void jwidget_add_child(JWidget widget, JWidget child) { jlist_append(widget->children, child); child->parent = widget; @@ -532,7 +557,7 @@ void jwidget_add_childs(JWidget widget, ...) va_end(ap); } -void jwidget_remove_child (JWidget widget, JWidget child) +void jwidget_remove_child(JWidget widget, JWidget child) { jlist_remove(widget->children, child); child->parent = NULL; @@ -636,7 +661,7 @@ bool jwidget_has_child(JWidget widget, JWidget child) /**********************************************************************/ /* position and geometry */ -void jwidget_request_size (JWidget widget, int *w, int *h) +void jwidget_request_size(JWidget widget, int *w, int *h) { JMessage msg = jmessage_new(JM_REQSIZE); jwidget_send_message(widget, msg); @@ -786,7 +811,7 @@ JRegion jwidget_get_drawable_region(JWidget widget, int flags) return region; } -int jwidget_get_bg_color (JWidget widget) +int jwidget_get_bg_color(JWidget widget) { if (widget->bg_color < 0 && widget->parent) return jwidget_get_bg_color (widget->parent); @@ -794,12 +819,12 @@ int jwidget_get_bg_color (JWidget widget) return widget->bg_color; } -JTheme jwidget_get_theme (JWidget widget) +JTheme jwidget_get_theme(JWidget widget) { return widget->theme; } -int jwidget_get_text_length (JWidget widget) +int jwidget_get_text_length(JWidget widget) { #if 1 return ji_font_text_len (widget->text_font, widget->text); @@ -808,14 +833,14 @@ int jwidget_get_text_length (JWidget widget) #endif } -int jwidget_get_text_height (JWidget widget) +int jwidget_get_text_height(JWidget widget) { return text_height (widget->text_font); } -void jwidget_get_texticon_info (JWidget widget, - JRect box, JRect text, JRect icon, - int icon_align, int icon_w, int icon_h) +void jwidget_get_texticon_info(JWidget widget, + JRect box, JRect text, JRect icon, + int icon_align, int icon_w, int icon_h) { #define SETRECT(r) \ if (r) { \ @@ -914,7 +939,7 @@ void jwidget_get_texticon_info (JWidget widget, SETRECT (icon); } -void jwidget_noborders (JWidget widget) +void jwidget_noborders(JWidget widget) { widget->border_width.l = 0; widget->border_width.t = 0; @@ -925,7 +950,7 @@ void jwidget_noborders (JWidget widget) jwidget_dirty (widget); } -void jwidget_set_border (JWidget widget, int l, int t, int r, int b) +void jwidget_set_border(JWidget widget, int l, int t, int r, int b) { widget->border_width.l = l; widget->border_width.t = t; @@ -935,7 +960,7 @@ void jwidget_set_border (JWidget widget, int l, int t, int r, int b) jwidget_dirty (widget); } -void jwidget_set_rect (JWidget widget, JRect rect) +void jwidget_set_rect(JWidget widget, JRect rect) { JMessage msg = jmessage_new (JM_SETPOS); jrect_copy (&msg->setpos.rect, rect); diff --git a/jinete/src/jwindow.c b/jinete/src/jwindow.c index c7f43008a..d6717dbee 100644 --- a/jinete/src/jwindow.c +++ b/jinete/src/jwindow.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #define REDRAW_MOVEMENT diff --git a/jinete/src/themes/jsimple.c b/jinete/src/themes/jsimple.c index 42f358eef..c8c1a7bdb 100644 --- a/jinete/src/themes/jsimple.c +++ b/jinete/src/themes/jsimple.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/jinete/src/themes/jstand.c b/jinete/src/themes/jstand.c index f482978da..5cb128fb5 100644 --- a/jinete/src/themes/jstand.c +++ b/jinete/src/themes/jstand.c @@ -1,7 +1,32 @@ -/* jinete - a GUI library - * Copyright (C) 2003-2005, 2007 by David A. Capello +/* Jinete - a GUI library + * Copyright (c) 2003, 2004, 2005, 2007, David A. Capello + * All rights reserved. * - * Jinete is gift-ware. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of the Jinete nor the names of its contributors may + * be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include diff --git a/makefile.gcc b/makefile.gcc index 3028cdb73..3be69f36e 100644 --- a/makefile.gcc +++ b/makefile.gcc @@ -83,6 +83,7 @@ $(ZLIB_LIB): $(ZLIB_OBJS) # Rules to build objects and the application VPATH = src \ + src/commands \ src/console \ src/core \ src/dialogs \ diff --git a/makefile.lst b/makefile.lst index a3af1e7f4..1b4b0ac56 100644 --- a/makefile.lst +++ b/makefile.lst @@ -6,6 +6,92 @@ ASE = ase$(EXE) ASE_SOURCES = \ + src/commands/cmd_about.c \ + src/commands/cmd_advanced_mode.c \ + src/commands/cmd_auto_crop_sprite.c \ + src/commands/cmd_brush_tool.c \ + src/commands/cmd_change_image_type.c \ + src/commands/cmd_clear.c \ + src/commands/cmd_close_all_files.c \ + src/commands/cmd_close_editor.c \ + src/commands/cmd_close_file.c \ + src/commands/cmd_color_curve.c \ + src/commands/cmd_configure_screen.c \ + src/commands/cmd_configure_tools.c \ + src/commands/cmd_convolution_matrix.c \ + src/commands/cmd_copy.c \ + src/commands/cmd_copy_frame.c \ + src/commands/cmd_crop_frame.c \ + src/commands/cmd_crop_layer.c \ + src/commands/cmd_crop_sprite.c \ + src/commands/cmd_customize.c \ + src/commands/cmd_cut.c \ + src/commands/cmd_deselect_mask.c \ + src/commands/cmd_despeckle.c \ + src/commands/cmd_dots_tool.c \ + src/commands/cmd_draw_text.c \ + src/commands/cmd_duplicate_layer.c \ + src/commands/cmd_duplicate_sprite.c \ + src/commands/cmd_ellipse_tool.c \ + src/commands/cmd_exit.c \ + src/commands/cmd_film_editor.c \ + src/commands/cmd_flatten_layers.c \ + src/commands/cmd_flip_horizontal.c \ + src/commands/cmd_flip_vertical.c \ + src/commands/cmd_floodfill_tool.c \ + src/commands/cmd_frame_properties.c \ + src/commands/cmd_invert_color.c \ + src/commands/cmd_invert_mask.c \ + src/commands/cmd_layer_properties.c \ + src/commands/cmd_line_tool.c \ + src/commands/cmd_link_frame.c \ + src/commands/cmd_load_mask.c \ + src/commands/cmd_load_session.c \ + src/commands/cmd_make_unique_editor.c \ + src/commands/cmd_mapgen.c \ + src/commands/cmd_marker_tool.c \ + src/commands/cmd_mask_all.c \ + src/commands/cmd_mask_by_color.c \ + src/commands/cmd_mask_repository.c \ + src/commands/cmd_merge_down_layer.c \ + src/commands/cmd_move_frame.c \ + src/commands/cmd_new_file.c \ + src/commands/cmd_new_frame.c \ + src/commands/cmd_new_layer.c \ + src/commands/cmd_new_layer_set.c \ + src/commands/cmd_open_file.c \ + src/commands/cmd_options.c \ + src/commands/cmd_palette_editor.c \ + src/commands/cmd_paste.c \ + src/commands/cmd_pencil_tool.c \ + src/commands/cmd_play_flic.c \ + src/commands/cmd_preview_fit_to_screen.c \ + src/commands/cmd_preview_normal.c \ + src/commands/cmd_preview_tiled.c \ + src/commands/cmd_quick_copy.c \ + src/commands/cmd_quick_move.c \ + src/commands/cmd_record_screen.c \ + src/commands/cmd_rectangle_tool.c \ + src/commands/cmd_redo.c \ + src/commands/cmd_refresh.c \ + src/commands/cmd_remove_frame.c \ + src/commands/cmd_remove_layer.c \ + src/commands/cmd_replace_color.c \ + src/commands/cmd_reselect_mask.c \ + src/commands/cmd_run_script.c \ + src/commands/cmd_save_file.c \ + src/commands/cmd_save_file_as.c \ + src/commands/cmd_save_mask.c \ + src/commands/cmd_save_session.c \ + src/commands/cmd_screen_shot.c \ + src/commands/cmd_select_file.c \ + src/commands/cmd_split_editor_horizontally.c \ + src/commands/cmd_split_editor_vertically.c \ + src/commands/cmd_spray_tool.c \ + src/commands/cmd_sprite_properties.c \ + src/commands/cmd_tips.c \ + src/commands/cmd_undo.c \ + src/commands/commands.c \ src/console/console.c \ src/core/app.c \ src/core/config.c \ @@ -120,7 +206,7 @@ ASE_SOURCES = \ src/widgets/editor/editor.c \ src/widgets/editor/keys.c \ src/widgets/groupbut.c \ - src/widgets/menu.c \ + src/widgets/menuitem.c \ src/widgets/paledit.c \ src/widgets/preview.c \ src/widgets/statebar.c \ diff --git a/makefile.mgw b/makefile.mgw index 88aeb16ec..a6e988d19 100644 --- a/makefile.mgw +++ b/makefile.mgw @@ -16,8 +16,8 @@ endif CFLAGS = # LFLAGS = -Wl,--subsystem,windows -# LFLAGS = -mconsole -LFLAGS = -mwindows +LFLAGS = -mconsole +# LFLAGS = -mwindows #LFLAGS_LAST = -lalleg -lmoldname-msvc # LFLAGS_LAST = -lalleg -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lshlwapi -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lcomctl32 -lsecur32 -lmsimg32 # LFLAGS_LAST = -lalleg diff --git a/src/dialogs/about.c b/src/commands/cmd_about.c similarity index 81% rename from src/dialogs/about.c rename to src/commands/cmd_about.c index 806344e15..32ac23e86 100644 --- a/src/dialogs/about.c +++ b/src/commands/cmd_about.c @@ -1,64 +1,51 @@ -/* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005, 2007 David A. Capello - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include "config.h" - -#ifndef USE_PRECOMPILED_HEADER - -#include -#include -#include - -#include "jinete/box.h" -#include "jinete/button.h" -#include "jinete/label.h" -#include "jinete/sep.h" -#include "jinete/system.h" -#include "jinete/widget.h" -#include "jinete/window.h" - -#include "core/core.h" - -#endif - -void dialogs_about(void) -{ - JWidget window, box1, label1, label2, label3, label4; - JWidget separator1, button1; - - if (!is_interactive()) - return; - - window = jwindow_new(_("About ASE")); - box1 = jbox_new(JI_VERTICAL); - label1 = jlabel_new("Allegro Sprite Editor - " VERSION); - label2 = jlabel_new(_("The Ultimate Sprites Factory")); - separator1 = ji_separator_new(NULL, JI_HORIZONTAL); - label3 = jlabel_new(COPYRIGHT); - label4 = jlabel_new("http://ase.sourceforge.net/"); - button1 = jbutton_new(_("&Close")); - - jwidget_magnetic(button1, TRUE); - - jwidget_add_childs(box1, label1, label2, separator1, label3, label4, - button1, NULL); - jwidget_add_child(window, box1); - - jwindow_open_fg(window); - jwidget_free(window); -} +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/core.h" + +#endif + +void command_execute_about(const char *argument) +{ + JWidget window, box1, label1, label2, label3, label4; + JWidget separator1, button1; + + window = jwindow_new(_("About ASE")); + box1 = jbox_new(JI_VERTICAL); + label1 = jlabel_new("Allegro Sprite Editor - " VERSION); + label2 = jlabel_new(_("The Ultimate Sprites Factory")); + separator1 = ji_separator_new(NULL, JI_HORIZONTAL); + label3 = jlabel_new(COPYRIGHT); + label4 = jlabel_new("http://ase.sourceforge.net/"); + button1 = jbutton_new(_("&Close")); + + jwidget_magnetic(button1, TRUE); + + jwidget_add_childs(box1, label1, label2, separator1, label3, label4, + button1, NULL); + jwidget_add_child(window, box1); + + jwindow_open_fg(window); + jwidget_free(window); +} diff --git a/src/commands/cmd_advanced_mode.c b/src/commands/cmd_advanced_mode.c new file mode 100644 index 000000000..3996f028a --- /dev/null +++ b/src/commands/cmd_advanced_mode.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_advanced_mode(const char *argument) +{ +} diff --git a/src/commands/cmd_auto_crop_sprite.c b/src/commands/cmd_auto_crop_sprite.c new file mode 100644 index 000000000..07b3d8e1d --- /dev/null +++ b/src/commands/cmd_auto_crop_sprite.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_auto_crop_sprite(const char *argument) +{ +} diff --git a/src/commands/cmd_brush_tool.c b/src/commands/cmd_brush_tool.c new file mode 100644 index 000000000..6299ea3d3 --- /dev/null +++ b/src/commands/cmd_brush_tool.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_brush_tool(const char *argument) +{ +} diff --git a/src/commands/cmd_change_image_type.c b/src/commands/cmd_change_image_type.c new file mode 100644 index 000000000..0a18f5550 --- /dev/null +++ b/src/commands/cmd_change_image_type.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_change_image_type(const char *argument) +{ +} diff --git a/src/commands/cmd_clear.c b/src/commands/cmd_clear.c new file mode 100644 index 000000000..b21d74e26 --- /dev/null +++ b/src/commands/cmd_clear.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_clear(const char *argument) +{ +} diff --git a/src/commands/cmd_close_all_files.c b/src/commands/cmd_close_all_files.c new file mode 100644 index 000000000..ddf5a7521 --- /dev/null +++ b/src/commands/cmd_close_all_files.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_close_all_files(const char *argument) +{ +} diff --git a/src/commands/cmd_close_editor.c b/src/commands/cmd_close_editor.c new file mode 100644 index 000000000..77f757627 --- /dev/null +++ b/src/commands/cmd_close_editor.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_close_editor(const char *argument) +{ +} diff --git a/src/commands/cmd_close_file.c b/src/commands/cmd_close_file.c new file mode 100644 index 000000000..c8461ddbf --- /dev/null +++ b/src/commands/cmd_close_file.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_close_file(const char *argument) +{ +} diff --git a/src/commands/cmd_color_curve.c b/src/commands/cmd_color_curve.c new file mode 100644 index 000000000..faa027dd5 --- /dev/null +++ b/src/commands/cmd_color_curve.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_color_curve(const char *argument) +{ +} diff --git a/src/commands/cmd_configure_screen.c b/src/commands/cmd_configure_screen.c new file mode 100644 index 000000000..ee97f6ff4 --- /dev/null +++ b/src/commands/cmd_configure_screen.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_configure_screen(const char *argument) +{ +} diff --git a/src/commands/cmd_configure_tools.c b/src/commands/cmd_configure_tools.c new file mode 100644 index 000000000..f1a35bee1 --- /dev/null +++ b/src/commands/cmd_configure_tools.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_configure_tools(const char *argument) +{ +} diff --git a/src/commands/cmd_convolution_matrix.c b/src/commands/cmd_convolution_matrix.c new file mode 100644 index 000000000..4946b17c8 --- /dev/null +++ b/src/commands/cmd_convolution_matrix.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_convolution_matrix(const char *argument) +{ +} diff --git a/src/commands/cmd_copy.c b/src/commands/cmd_copy.c new file mode 100644 index 000000000..1449f3717 --- /dev/null +++ b/src/commands/cmd_copy.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_copy(const char *argument) +{ +} diff --git a/src/commands/cmd_copy_frame.c b/src/commands/cmd_copy_frame.c new file mode 100644 index 000000000..3ff2d671f --- /dev/null +++ b/src/commands/cmd_copy_frame.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_copy_frame(const char *argument) +{ +} diff --git a/src/commands/cmd_crop_frame.c b/src/commands/cmd_crop_frame.c new file mode 100644 index 000000000..44ea15b8e --- /dev/null +++ b/src/commands/cmd_crop_frame.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_crop_frame(const char *argument) +{ +} diff --git a/src/commands/cmd_crop_layer.c b/src/commands/cmd_crop_layer.c new file mode 100644 index 000000000..55db47422 --- /dev/null +++ b/src/commands/cmd_crop_layer.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_crop_layer(const char *argument) +{ +} diff --git a/src/commands/cmd_crop_sprite.c b/src/commands/cmd_crop_sprite.c new file mode 100644 index 000000000..4d55929bb --- /dev/null +++ b/src/commands/cmd_crop_sprite.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_crop_sprite(const char *argument) +{ +} diff --git a/src/commands/cmd_customize.c b/src/commands/cmd_customize.c new file mode 100644 index 000000000..fa298a8bb --- /dev/null +++ b/src/commands/cmd_customize.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_customize(const char *argument) +{ +} diff --git a/src/dialogs/about.h b/src/commands/cmd_cut.c similarity index 73% rename from src/dialogs/about.h rename to src/commands/cmd_cut.c index 4d71d986d..83333d1d5 100644 --- a/src/dialogs/about.h +++ b/src/commands/cmd_cut.c @@ -1,25 +1,33 @@ -/* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005, 2007 David A. Capello - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef DIALOGS_ABOUT_H -#define DIALOGS_ABOUT_H - -void dialogs_about(void); - -#endif /* DIALOGS_ABOUT_H */ - +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_cut(const char *argument) +{ +} diff --git a/src/commands/cmd_deselect_mask.c b/src/commands/cmd_deselect_mask.c new file mode 100644 index 000000000..f65f69418 --- /dev/null +++ b/src/commands/cmd_deselect_mask.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_deselect_mask(const char *argument) +{ +} diff --git a/src/commands/cmd_despeckle.c b/src/commands/cmd_despeckle.c new file mode 100644 index 000000000..7d6b5745e --- /dev/null +++ b/src/commands/cmd_despeckle.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_despeckle(const char *argument) +{ +} diff --git a/src/commands/cmd_dots_tool.c b/src/commands/cmd_dots_tool.c new file mode 100644 index 000000000..d699a4064 --- /dev/null +++ b/src/commands/cmd_dots_tool.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_dots_tool(const char *argument) +{ +} diff --git a/src/commands/cmd_draw_text.c b/src/commands/cmd_draw_text.c new file mode 100644 index 000000000..318a3cb36 --- /dev/null +++ b/src/commands/cmd_draw_text.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_draw_text(const char *argument) +{ +} diff --git a/src/commands/cmd_duplicate_layer.c b/src/commands/cmd_duplicate_layer.c new file mode 100644 index 000000000..05971e459 --- /dev/null +++ b/src/commands/cmd_duplicate_layer.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_duplicate_layer(const char *argument) +{ +} diff --git a/src/commands/cmd_duplicate_sprite.c b/src/commands/cmd_duplicate_sprite.c new file mode 100644 index 000000000..613d46a79 --- /dev/null +++ b/src/commands/cmd_duplicate_sprite.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_duplicate_sprite(const char *argument) +{ +} diff --git a/src/commands/cmd_ellipse_tool.c b/src/commands/cmd_ellipse_tool.c new file mode 100644 index 000000000..a027af289 --- /dev/null +++ b/src/commands/cmd_ellipse_tool.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_ellipse_tool(const char *argument) +{ +} diff --git a/src/commands/cmd_exit.c b/src/commands/cmd_exit.c new file mode 100644 index 000000000..50a3c2a85 --- /dev/null +++ b/src/commands/cmd_exit.c @@ -0,0 +1,51 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_exit(const char *argument) +{ + Sprite *sprite = get_first_sprite(); + Sprite *clipboard = get_clipboard_sprite(); + + while (sprite) { + /* check if this sprite is modified */ + + if (sprite_is_modified(sprite) && + (!clipboard || sprite->gfxobj.id != clipboard->gfxobj.id)) { + if (jalert(_("Warning< +#include + +#include "jinete.h" + +#include "console/console.h" +#include "core/app.h" +#include "dialogs/colsel.h" +#include "modules/color.h" +#include "modules/gui.h" +#include "modules/sprites.h" +#include "raster/image.h" +#include "raster/sprite.h" +#include "util/misc.h" + +#endif + +static const char *bg_table[] = { + "mask", + "rgb{0,0,0}", + "rgb{255,255,255}", + "rgb{255,0,255}" +}; + +static int _sprite_counter = 0; + +static Sprite *new_sprite(int imgtype, int w, int h); + +/** + * Shows the "New Sprite" dialog. + */ +void command_execute_new_file(const char *argument) +{ + JWidget window, width, height, radio1, radio2, radio3, ok, bg_box; + int imgtype, w, h, bg; + char buf[1024]; + Sprite *sprite; + char *color; + + /* load the window widget */ + window = load_widget("newspr.jid", "new_sprite"); + if (!window) + return; + + width = jwidget_find_name(window, "width"); + height = jwidget_find_name(window, "height"); + radio1 = jwidget_find_name(window, "radio1"); + radio2 = jwidget_find_name(window, "radio2"); + radio3 = jwidget_find_name(window, "radio3"); + ok = jwidget_find_name(window, "ok_button"); + bg_box = jwidget_find_name(window, "bg_box"); + + /* default values: Indexed, 320x200, Transparent */ + imgtype = get_config_int("NewSprite", "Type", IMAGE_INDEXED); + imgtype = MID(IMAGE_RGB, imgtype, IMAGE_INDEXED); + w = get_config_int("NewSprite", "Width", 320); + h = get_config_int("NewSprite", "Height", 200); + bg = get_config_int("NewSprite", "Background", 0); + + usprintf(buf, "%d", w); jwidget_set_text(width, buf); + usprintf(buf, "%d", h); jwidget_set_text(height, buf); + + /* select image-type */ + switch (imgtype) { + case IMAGE_RGB: jwidget_select(radio1); break; + case IMAGE_GRAYSCALE: jwidget_select(radio2); break; + case IMAGE_INDEXED: jwidget_select(radio3); break; + } + + /* select background color */ + jlistbox_select_index(bg_box, bg); + + /* open the window */ + jwindow_open_fg(window); + + if (jwindow_get_killer(window) == ok) { + /* get the options */ + if (jwidget_is_selected(radio1)) imgtype = IMAGE_RGB; + else if (jwidget_is_selected(radio2)) imgtype = IMAGE_GRAYSCALE; + else if (jwidget_is_selected(radio3)) imgtype = IMAGE_INDEXED; + + w = ustrtol(jwidget_get_text(width), NULL, 10); + h = ustrtol(jwidget_get_text(height), NULL, 10); + bg = jlistbox_get_selected_index(bg_box); + + w = MID(1, w, 9999); + h = MID(1, h, 9999); + + /* select the color */ + color = NULL; + + if (bg >= 0 && bg <= 3) { + color = jstrdup(bg_table[bg]); + } + else { + const char *default_color = + get_config_string("NewSprite", + "BackgroundCustom", + "rgb{0,0,0}"); + + color = ji_color_select(imgtype, default_color); + if (color) + set_config_string("NewSprite", "BackgroundCustom", color); + } + + if (color) { + /* save the configuration */ + set_config_int("NewSprite", "Type", imgtype); + set_config_int("NewSprite", "Width", w); + set_config_int("NewSprite", "Height", h); + set_config_int("NewSprite", "Background", bg); + + /* create the new sprite */ + sprite = new_sprite(imgtype, w, h); + if (!sprite) { + console_printf("Not enough memory to allocate the sprite\n"); + } + else { + usprintf(buf, "Sprite-%04d", ++_sprite_counter); + sprite_set_filename(sprite, buf); + + image_clear(GetImage(), get_color_for_image(imgtype, color)); + + sprite_show(sprite); + } + + jfree(color); + } + } + + jwidget_free(window); +} + +static Sprite *new_sprite(int imgtype, int w, int h) +{ + /* new sprite */ + Sprite *sprite = sprite_new_with_layer(imgtype, w, h); + if (!sprite) + return NULL; + + sprite_mount(sprite); + set_current_sprite(sprite); + return sprite; +} diff --git a/src/commands/cmd_new_frame.c b/src/commands/cmd_new_frame.c new file mode 100644 index 000000000..5d288d775 --- /dev/null +++ b/src/commands/cmd_new_frame.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_new_frame(const char *argument) +{ +} diff --git a/src/commands/cmd_new_layer.c b/src/commands/cmd_new_layer.c new file mode 100644 index 000000000..62c960943 --- /dev/null +++ b/src/commands/cmd_new_layer.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_new_layer(const char *argument) +{ +} diff --git a/src/commands/cmd_new_layer_set.c b/src/commands/cmd_new_layer_set.c new file mode 100644 index 000000000..12f4980cf --- /dev/null +++ b/src/commands/cmd_new_layer_set.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_new_layer_set(const char *argument) +{ +} diff --git a/src/commands/cmd_open_file.c b/src/commands/cmd_open_file.c new file mode 100644 index 000000000..e66d8d91e --- /dev/null +++ b/src/commands/cmd_open_file.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_open_file(const char *argument) +{ +} diff --git a/src/commands/cmd_options.c b/src/commands/cmd_options.c new file mode 100644 index 000000000..0b1596572 --- /dev/null +++ b/src/commands/cmd_options.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_options(const char *argument) +{ +} diff --git a/src/commands/cmd_palette_editor.c b/src/commands/cmd_palette_editor.c new file mode 100644 index 000000000..00c57b2e3 --- /dev/null +++ b/src/commands/cmd_palette_editor.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_palette_editor(const char *argument) +{ +} diff --git a/src/commands/cmd_paste.c b/src/commands/cmd_paste.c new file mode 100644 index 000000000..3f6ace049 --- /dev/null +++ b/src/commands/cmd_paste.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_paste(const char *argument) +{ +} diff --git a/src/commands/cmd_pencil_tool.c b/src/commands/cmd_pencil_tool.c new file mode 100644 index 000000000..b1718fe03 --- /dev/null +++ b/src/commands/cmd_pencil_tool.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_pencil_tool(const char *argument) +{ +} diff --git a/src/commands/cmd_play_flic.c b/src/commands/cmd_play_flic.c new file mode 100644 index 000000000..449959615 --- /dev/null +++ b/src/commands/cmd_play_flic.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_play_flic(const char *argument) +{ +} diff --git a/src/commands/cmd_preview_fit_to_screen.c b/src/commands/cmd_preview_fit_to_screen.c new file mode 100644 index 000000000..f63e39812 --- /dev/null +++ b/src/commands/cmd_preview_fit_to_screen.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_preview_fit_to_screen(const char *argument) +{ +} diff --git a/src/commands/cmd_preview_normal.c b/src/commands/cmd_preview_normal.c new file mode 100644 index 000000000..15dd992d9 --- /dev/null +++ b/src/commands/cmd_preview_normal.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_preview_normal(const char *argument) +{ +} diff --git a/src/commands/cmd_preview_tiled.c b/src/commands/cmd_preview_tiled.c new file mode 100644 index 000000000..a36451e5b --- /dev/null +++ b/src/commands/cmd_preview_tiled.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_preview_tiled(const char *argument) +{ +} diff --git a/src/commands/cmd_quick_copy.c b/src/commands/cmd_quick_copy.c new file mode 100644 index 000000000..2db42976c --- /dev/null +++ b/src/commands/cmd_quick_copy.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_quick_copy(const char *argument) +{ +} diff --git a/src/commands/cmd_quick_move.c b/src/commands/cmd_quick_move.c new file mode 100644 index 000000000..312326743 --- /dev/null +++ b/src/commands/cmd_quick_move.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_quick_move(const char *argument) +{ +} diff --git a/src/commands/cmd_record_screen.c b/src/commands/cmd_record_screen.c new file mode 100644 index 000000000..6e3b0a067 --- /dev/null +++ b/src/commands/cmd_record_screen.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_record_screen(const char *argument) +{ +} diff --git a/src/commands/cmd_rectangle_tool.c b/src/commands/cmd_rectangle_tool.c new file mode 100644 index 000000000..c105171f1 --- /dev/null +++ b/src/commands/cmd_rectangle_tool.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_rectangle_tool(const char *argument) +{ +} diff --git a/src/commands/cmd_redo.c b/src/commands/cmd_redo.c new file mode 100644 index 000000000..a078cc270 --- /dev/null +++ b/src/commands/cmd_redo.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_redo(const char *argument) +{ +} diff --git a/src/commands/cmd_refresh.c b/src/commands/cmd_refresh.c new file mode 100644 index 000000000..2e29c8584 --- /dev/null +++ b/src/commands/cmd_refresh.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_refresh(const char *argument) +{ +} diff --git a/src/commands/cmd_remove_frame.c b/src/commands/cmd_remove_frame.c new file mode 100644 index 000000000..f406a2b49 --- /dev/null +++ b/src/commands/cmd_remove_frame.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_remove_frame(const char *argument) +{ +} diff --git a/src/commands/cmd_remove_layer.c b/src/commands/cmd_remove_layer.c new file mode 100644 index 000000000..4843b6d84 --- /dev/null +++ b/src/commands/cmd_remove_layer.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_remove_layer(const char *argument) +{ +} diff --git a/src/commands/cmd_replace_color.c b/src/commands/cmd_replace_color.c new file mode 100644 index 000000000..364e05230 --- /dev/null +++ b/src/commands/cmd_replace_color.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_replace_color(const char *argument) +{ +} diff --git a/src/commands/cmd_reselect_mask.c b/src/commands/cmd_reselect_mask.c new file mode 100644 index 000000000..d1b834dd8 --- /dev/null +++ b/src/commands/cmd_reselect_mask.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_reselect_mask(const char *argument) +{ +} diff --git a/src/commands/cmd_run_script.c b/src/commands/cmd_run_script.c new file mode 100644 index 000000000..64bd76810 --- /dev/null +++ b/src/commands/cmd_run_script.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_run_script(const char *argument) +{ +} diff --git a/src/commands/cmd_save_file.c b/src/commands/cmd_save_file.c new file mode 100644 index 000000000..c04027bde --- /dev/null +++ b/src/commands/cmd_save_file.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_save_file(const char *argument) +{ +} diff --git a/src/commands/cmd_save_file_as.c b/src/commands/cmd_save_file_as.c new file mode 100644 index 000000000..9d8115681 --- /dev/null +++ b/src/commands/cmd_save_file_as.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_save_file_as(const char *argument) +{ +} diff --git a/src/commands/cmd_save_mask.c b/src/commands/cmd_save_mask.c new file mode 100644 index 000000000..99bf7b09e --- /dev/null +++ b/src/commands/cmd_save_mask.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_save_mask(const char *argument) +{ +} diff --git a/src/commands/cmd_save_session.c b/src/commands/cmd_save_session.c new file mode 100644 index 000000000..ebdcec44a --- /dev/null +++ b/src/commands/cmd_save_session.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_save_session(const char *argument) +{ +} diff --git a/src/commands/cmd_screen_shot.c b/src/commands/cmd_screen_shot.c new file mode 100644 index 000000000..fa3e3bceb --- /dev/null +++ b/src/commands/cmd_screen_shot.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_screen_shot(const char *argument) +{ +} diff --git a/src/commands/cmd_select_file.c b/src/commands/cmd_select_file.c new file mode 100644 index 000000000..d5d232ceb --- /dev/null +++ b/src/commands/cmd_select_file.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_select_file(const char *argument) +{ +} diff --git a/src/commands/cmd_split_editor_horizontally.c b/src/commands/cmd_split_editor_horizontally.c new file mode 100644 index 000000000..61d9815c7 --- /dev/null +++ b/src/commands/cmd_split_editor_horizontally.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_split_editor_horizontally(const char *argument) +{ +} diff --git a/src/commands/cmd_split_editor_vertically.c b/src/commands/cmd_split_editor_vertically.c new file mode 100644 index 000000000..7d6182ae5 --- /dev/null +++ b/src/commands/cmd_split_editor_vertically.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_split_editor_vertically(const char *argument) +{ +} diff --git a/src/commands/cmd_spray_tool.c b/src/commands/cmd_spray_tool.c new file mode 100644 index 000000000..7cbb0b15d --- /dev/null +++ b/src/commands/cmd_spray_tool.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_spray_tool(const char *argument) +{ +} diff --git a/src/commands/cmd_sprite_properties.c b/src/commands/cmd_sprite_properties.c new file mode 100644 index 000000000..a1f0ca3d2 --- /dev/null +++ b/src/commands/cmd_sprite_properties.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_sprite_properties(const char *argument) +{ +} diff --git a/src/commands/cmd_tips.c b/src/commands/cmd_tips.c new file mode 100644 index 000000000..52088e2d8 --- /dev/null +++ b/src/commands/cmd_tips.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_tips(const char *argument) +{ +} diff --git a/src/commands/cmd_undo.c b/src/commands/cmd_undo.c new file mode 100644 index 000000000..5affde586 --- /dev/null +++ b/src/commands/cmd_undo.c @@ -0,0 +1,33 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +#include "jinete.h" + +#include "core/app.h" +#include "modules/sprites.h" +#include "raster/sprite.h" + +#endif + +void command_execute_undo(const char *argument) +{ +} diff --git a/src/commands/commands.c b/src/commands/commands.c new file mode 100644 index 000000000..8af8c9adf --- /dev/null +++ b/src/commands/commands.c @@ -0,0 +1,296 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" + +#ifndef USE_PRECOMPILED_HEADER + +/* #include */ +#include +#include + +#include "jinete.h" + +#include "commands/commands.h" +/* #include "core/app.h" */ +/* #include "core/core.h" */ +/* #include "core/dirs.h" */ +/* #include "intl/intl.h" */ +/* #include "modules/chkmthds.h" */ +/* #include "modules/rootmenu.h" */ +/* #include "util/hash.h" */ +/* #include "util/filetoks.h" */ +/* #include "widgets/menu.h" */ + +#endif + +#define CMD0(name) { #name, NULL, NULL, command_execute_##name, NULL } +/* #define CMD1(name) { #name, NULL, NULL, NULL, NULL } */ +/* #define CMD2(name) { #name, NULL, NULL, NULL, NULL } */ +/* #define CMD3(name) { #name, NULL, NULL, NULL, NULL } */ +/* #define CMD4(name) { #name, NULL, NULL, NULL, NULL } */ + +void command_execute_about(const char *argument); +void command_execute_advanced_mode(const char *argument); +void command_execute_auto_crop_sprite(const char *argument); +void command_execute_brush_tool(const char *argument); +void command_execute_change_image_type(const char *argument); +void command_execute_clear(const char *argument); +void command_execute_close_all_files(const char *argument); +void command_execute_close_editor(const char *argument); +void command_execute_close_file(const char *argument); +void command_execute_color_curve(const char *argument); +void command_execute_configure_screen(const char *argument); +void command_execute_configure_tools(const char *argument); +void command_execute_convolution_matrix(const char *argument); +void command_execute_copy(const char *argument); +void command_execute_copy_frame(const char *argument); +void command_execute_crop_frame(const char *argument); +void command_execute_crop_layer(const char *argument); +void command_execute_crop_sprite(const char *argument); +void command_execute_customize(const char *argument); +void command_execute_cut(const char *argument); +void command_execute_deselect_mask(const char *argument); +void command_execute_despeckle(const char *argument); +void command_execute_dots_tool(const char *argument); +void command_execute_draw_text(const char *argument); +void command_execute_duplicate_layer(const char *argument); +void command_execute_duplicate_sprite(const char *argument); +void command_execute_ellipse_tool(const char *argument); +void command_execute_exit(const char *argument); +void command_execute_exit(const char *argument); +void command_execute_film_editor(const char *argument); +void command_execute_flatten_layers(const char *argument); +void command_execute_flip_horizontal(const char *argument); +void command_execute_flip_vertical(const char *argument); +void command_execute_floodfill_tool(const char *argument); +void command_execute_frame_properties(const char *argument); +void command_execute_invert_color(const char *argument); +void command_execute_invert_mask(const char *argument); +void command_execute_layer_properties(const char *argument); +void command_execute_line_tool(const char *argument); +void command_execute_link_frame(const char *argument); +void command_execute_load_mask(const char *argument); +void command_execute_load_session(const char *argument); +void command_execute_make_unique_editor(const char *argument); +void command_execute_mapgen(const char *argument); +void command_execute_marker_tool(const char *argument); +void command_execute_mask_all(const char *argument); +void command_execute_mask_by_color(const char *argument); +void command_execute_mask_repository(const char *argument); +void command_execute_merge_down_layer(const char *argument); +void command_execute_move_frame(const char *argument); +void command_execute_new_file(const char *argument); +void command_execute_new_file(const char *argument); +void command_execute_new_frame(const char *argument); +void command_execute_new_layer(const char *argument); +void command_execute_new_layer_set(const char *argument); +void command_execute_open_file(const char *argument); +void command_execute_options(const char *argument); +void command_execute_palette_editor(const char *argument); +void command_execute_paste(const char *argument); +void command_execute_pencil_tool(const char *argument); +void command_execute_play_flic(const char *argument); +void command_execute_preview_fit_to_screen(const char *argument); +void command_execute_preview_normal(const char *argument); +void command_execute_preview_tiled(const char *argument); +void command_execute_quick_copy(const char *argument); +void command_execute_quick_move(const char *argument); +void command_execute_record_screen(const char *argument); +void command_execute_rectangle_tool(const char *argument); +void command_execute_redo(const char *argument); +void command_execute_refresh(const char *argument); +void command_execute_remove_frame(const char *argument); +void command_execute_remove_layer(const char *argument); +void command_execute_replace_color(const char *argument); +void command_execute_reselect_mask(const char *argument); +void command_execute_run_script(const char *argument); +void command_execute_save_file(const char *argument); +void command_execute_save_file_as(const char *argument); +void command_execute_save_mask(const char *argument); +void command_execute_save_session(const char *argument); +void command_execute_screen_shot(const char *argument); +void command_execute_select_file(const char *argument); +void command_execute_split_editor_horizontally(const char *argument); +void command_execute_split_editor_vertically(const char *argument); +void command_execute_spray_tool(const char *argument); +void command_execute_sprite_properties(const char *argument); +void command_execute_tips(const char *argument); +void command_execute_undo(const char *argument); + +static Command commands[] = { + CMD0(new_file), + { CMD_OPEN_FILE, NULL, NULL, NULL, NULL }, + { CMD_SAVE_FILE, NULL, NULL, NULL, NULL }, + { CMD_SAVE_FILE_AS, NULL, NULL, NULL, NULL }, + { CMD_CLOSE_FILE, NULL, NULL, NULL, NULL }, + { CMD_CLOSE_ALL_FILES, NULL, NULL, NULL, NULL }, + { CMD_SCREEN_SHOT, NULL, NULL, NULL, NULL }, + { CMD_RECORD_SCREEN, NULL, NULL, NULL, NULL }, + { CMD_LOAD_SESSION, NULL, NULL, NULL, NULL }, + { CMD_SAVE_SESSION, NULL, NULL, NULL, NULL }, + CMD0(about), + CMD0(exit), + { CMD_UNDO, NULL, NULL, NULL, NULL }, + { CMD_REDO, NULL, NULL, NULL, NULL }, + { CMD_CUT, NULL, NULL, NULL, NULL }, + { CMD_COPY, NULL, NULL, NULL, NULL }, + { CMD_PASTE, NULL, NULL, NULL, NULL }, + { CMD_CLEAR, NULL, NULL, NULL, NULL }, + { CMD_QUICK_MOVE, NULL, NULL, NULL, NULL }, + { CMD_QUICK_COPY, NULL, NULL, NULL, NULL }, + { CMD_FLIP_HORIZONTAL, NULL, NULL, NULL, NULL }, + { CMD_FLIP_VERTICAL, NULL, NULL, NULL, NULL }, + { CMD_REPLACE_COLOR, NULL, NULL, NULL, NULL }, + { CMD_INVERT_COLOR, NULL, NULL, NULL, NULL }, + { CMD_REFRESH, NULL, NULL, NULL, NULL }, + { CMD_CONFIGURE_SCREEN, NULL, NULL, NULL, NULL }, + { CMD_ADVANCED_MODE, NULL, NULL, NULL, NULL }, + { CMD_MAKE_UNIQUE_EDITOR, NULL, NULL, NULL, NULL }, + { CMD_SPLIT_EDITOR_VERTICALLY, NULL, NULL, NULL, NULL }, + { CMD_SPLIT_EDITOR_HORIZONTALLY, NULL, NULL, NULL, NULL }, + { CMD_CLOSE_EDITOR, NULL, NULL, NULL, NULL }, + { CMD_PREVIEW_TILED, NULL, NULL, NULL, NULL }, + { CMD_PREVIEW_NORMAL, NULL, NULL, NULL, NULL }, + { CMD_PREVIEW_FIT_TO_SCREEN, NULL, NULL, NULL, NULL }, + { CMD_SPRITE_PROPERTIES, NULL, NULL, NULL, NULL }, + { CMD_DUPLICATE_SPRITE, NULL, NULL, NULL, NULL }, + { CMD_CHANGE_IMAGE_TYPE, NULL, NULL, NULL, NULL }, + { CMD_CROP_SPRITE, NULL, NULL, NULL, NULL }, + { CMD_AUTO_CROP_SPRITE, NULL, NULL, NULL, NULL }, + { CMD_LAYER_PROPERTIES, NULL, NULL, NULL, NULL }, + { CMD_NEW_LAYER, NULL, NULL, NULL, NULL }, + { CMD_NEW_LAYER_SET, NULL, NULL, NULL, NULL }, + { CMD_REMOVE_LAYER, NULL, NULL, NULL, NULL }, + { CMD_DUPLICATE_LAYER, NULL, NULL, NULL, NULL }, + { CMD_MERGE_DOWN_LAYER, NULL, NULL, NULL, NULL }, + { CMD_FLATTEN_LAYERS, NULL, NULL, NULL, NULL }, + { CMD_CROP_LAYER, NULL, NULL, NULL, NULL }, + { CMD_FRAME_PROPERTIES, NULL, NULL, NULL, NULL }, + { CMD_REMOVE_FRAME, NULL, NULL, NULL, NULL }, + { CMD_NEW_FRAME, NULL, NULL, NULL, NULL }, + { CMD_MOVE_FRAME, NULL, NULL, NULL, NULL }, + { CMD_COPY_FRAME, NULL, NULL, NULL, NULL }, + { CMD_LINK_FRAME, NULL, NULL, NULL, NULL }, + { CMD_CROP_FRAME, NULL, NULL, NULL, NULL }, + { CMD_MASK_ALL, NULL, NULL, NULL, NULL }, + { CMD_DESELECT_MASK, NULL, NULL, NULL, NULL }, + { CMD_RESELECT_MASK, NULL, NULL, NULL, NULL }, + { CMD_INVERT_MASK, NULL, NULL, NULL, NULL }, + { CMD_MASK_BY_COLOR, NULL, NULL, NULL, NULL }, + { CMD_MASK_REPOSITORY, NULL, NULL, NULL, NULL }, + { CMD_LOAD_MASK, NULL, NULL, NULL, NULL }, + { CMD_SAVE_MASK, NULL, NULL, NULL, NULL }, + { CMD_CONFIGURE_TOOLS, NULL, NULL, NULL, NULL }, + { CMD_MARKER_TOOL, NULL, NULL, NULL, NULL }, + { CMD_DOTS_TOOL, NULL, NULL, NULL, NULL }, + { CMD_PENCIL_TOOL, NULL, NULL, NULL, NULL }, + { CMD_BRUSH_TOOL, NULL, NULL, NULL, NULL }, + { CMD_SPRAY_TOOL, NULL, NULL, NULL, NULL }, + { CMD_FLOODFILL_TOOL, NULL, NULL, NULL, NULL }, + { CMD_LINE_TOOL, NULL, NULL, NULL, NULL }, + { CMD_RECTANGLE_TOOL, NULL, NULL, NULL, NULL }, + { CMD_ELLIPSE_TOOL, NULL, NULL, NULL, NULL }, + { CMD_FILM_EDITOR, NULL, NULL, NULL, NULL }, + { CMD_PALETTE_EDITOR, NULL, NULL, NULL, NULL }, + { CMD_CONVOLUTION_MATRIX, NULL, NULL, NULL, NULL }, + { CMD_COLOR_CURVE, NULL, NULL, NULL, NULL }, + { CMD_DESPECKLE, NULL, NULL, NULL, NULL }, + { CMD_DRAW_TEXT, NULL, NULL, NULL, NULL }, + { CMD_PLAY_FLIC, NULL, NULL, NULL, NULL }, + { CMD_MAPGEN, NULL, NULL, NULL, NULL }, + { CMD_RUN_SCRIPT, NULL, NULL, NULL, NULL }, + { CMD_TIPS, NULL, NULL, NULL, NULL }, + { CMD_CUSTOMIZE, NULL, NULL, NULL, NULL }, + { CMD_OPTIONS, NULL, NULL, NULL, NULL }, + { NULL, NULL, NULL, NULL, NULL } + +}; + +Command *command_get_by_name(const char *name) +{ + Command *cmd; + + if (!name) + return NULL; + + for (cmd=commands; cmd->name; cmd++) { + if (strcmp(cmd->name, name) == 0) + return cmd; + } + + return NULL; +} + +Command *command_get_by_key(JMessage msg) +{ + Command *cmd; + + for (cmd=commands; cmd->name; cmd++) { + if (command_is_key_pressed(cmd, msg)) + return cmd; + } + + return NULL; +} + +bool command_is_enabled(Command *command, const char *argument) +{ + if (command && command->enabled) + return (*command->enabled)(argument); + else + return TRUE; +} + +bool command_is_selected(Command *command, const char *argument) +{ + if (command && command->selected) + return (*command->selected)(argument); + else + return FALSE; +} + +void command_execute(Command *command, const char *argument) +{ + if (command && command->execute) { + PRINTF("Executing command \"%s\"\n", command->name); + (*command->execute)(argument); + } +} + +bool command_is_key_pressed(Command *command, JMessage msg) +{ + if (command->accel) { + return jaccel_check(command->accel, + msg->any.shifts, + msg->key.ascii, + msg->key.scancode); + } + return FALSE; +} + +void command_add_key(Command *command, const char *string) +{ + char buf[256]; + + if (!command->accel) + command->accel = jaccel_new(); + + usprintf(buf, "<%s>", string); + jaccel_add_keys_from_string(command->accel, buf); +} diff --git a/src/commands/commands.h b/src/commands/commands.h new file mode 100644 index 000000000..fed4b770b --- /dev/null +++ b/src/commands/commands.h @@ -0,0 +1,131 @@ +/* ase -- allegro-sprite-editor: the ultimate sprites factory + * Copyright (C) 2007 David A. Capello + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef COMMANDS_COMMANDS_H +#define COMMANDS_COMMANDS_H + +#include "jinete/base.h" + +#define CMD_NEW_FILE "new_file" +#define CMD_OPEN_FILE "open_file" +#define CMD_SAVE_FILE "save_file" +#define CMD_SAVE_FILE_AS "save_file_as" +#define CMD_CLOSE_FILE "close_file" +#define CMD_CLOSE_ALL_FILES "close_all_files" +#define CMD_SCREEN_SHOT "screen_shot" +#define CMD_RECORD_SCREEN "record_screen" +#define CMD_LOAD_SESSION "load_session" +#define CMD_SAVE_SESSION "save_session" +#define CMD_ABOUT "about" +#define CMD_EXIT "exit" +#define CMD_UNDO "undo" +#define CMD_REDO "redo" +#define CMD_CUT "cut" +#define CMD_COPY "copy" +#define CMD_PASTE "paste" +#define CMD_CLEAR "clear" +#define CMD_QUICK_MOVE "quick_move" +#define CMD_QUICK_COPY "quick_copy" +#define CMD_FLIP_HORIZONTAL "flip_horizontal" +#define CMD_FLIP_VERTICAL "flip_vertical" +#define CMD_REPLACE_COLOR "replace_color" +#define CMD_INVERT_COLOR "invert_color" +#define CMD_REFRESH "refresh" +#define CMD_CONFIGURE_SCREEN "configure_screen" +#define CMD_ADVANCED_MODE "advanced_mode" +#define CMD_MAKE_UNIQUE_EDITOR "make_unique_editor" +#define CMD_SPLIT_EDITOR_VERTICALLY "split_editor_vertically" +#define CMD_SPLIT_EDITOR_HORIZONTALLY "split_editor_horizontally" +#define CMD_CLOSE_EDITOR "close_editor" +#define CMD_PREVIEW_TILED "preview_tiled" +#define CMD_PREVIEW_NORMAL "preview_normal" +#define CMD_PREVIEW_FIT_TO_SCREEN "preview_fit_to_screen" +#define CMD_SPRITE_PROPERTIES "sprite_properties" +#define CMD_DUPLICATE_SPRITE "duplicate_sprite" +#define CMD_CHANGE_IMAGE_TYPE "change_image_type" +#define CMD_CROP_SPRITE "crop_sprite" +#define CMD_AUTO_CROP_SPRITE "auto_crop_sprite" +#define CMD_LAYER_PROPERTIES "layer_properties" +#define CMD_NEW_LAYER "new_layer" +#define CMD_NEW_LAYER_SET "new_layer_set" +#define CMD_REMOVE_LAYER "remove_layer" +#define CMD_DUPLICATE_LAYER "duplicate_layer" +#define CMD_MERGE_DOWN_LAYER "merge_down_layer" +#define CMD_FLATTEN_LAYERS "flatten_layers" +#define CMD_CROP_LAYER "crop_layer" +#define CMD_FRAME_PROPERTIES "frame_properties" +#define CMD_REMOVE_FRAME "remove_frame" +#define CMD_NEW_FRAME "new_frame" +#define CMD_MOVE_FRAME "move_frame" +#define CMD_COPY_FRAME "copy_frame" +#define CMD_LINK_FRAME "link_frame" +#define CMD_CROP_FRAME "crop_frame" +#define CMD_MASK_ALL "mask_all" +#define CMD_DESELECT_MASK "deselect_mask" +#define CMD_RESELECT_MASK "reselect_mask" +#define CMD_INVERT_MASK "invert_mask" +#define CMD_MASK_BY_COLOR "mask_by_color" +#define CMD_MASK_REPOSITORY "mask_repository" +#define CMD_LOAD_MASK "load_mask" +#define CMD_SAVE_MASK "save_mask" +#define CMD_CONFIGURE_TOOLS "configure_tools" +#define CMD_MARKER_TOOL "marker_tool" +#define CMD_DOTS_TOOL "dots_tool" +#define CMD_PENCIL_TOOL "pencil_tool" +#define CMD_BRUSH_TOOL "brush_tool" +#define CMD_SPRAY_TOOL "spray_tool" +#define CMD_FLOODFILL_TOOL "floodfill_tool" +#define CMD_LINE_TOOL "line_tool" +#define CMD_RECTANGLE_TOOL "rectangle_tool" +#define CMD_ELLIPSE_TOOL "ellipse_tool" +#define CMD_FILM_EDITOR "film_editor" +#define CMD_PALETTE_EDITOR "palette_editor" +#define CMD_CONVOLUTION_MATRIX "convolution_matrix" +#define CMD_COLOR_CURVE "color_curve" +#define CMD_DESPECKLE "despeckle" +#define CMD_DRAW_TEXT "draw_text" +#define CMD_PLAY_FLIC "play_flic" +#define CMD_MAPGEN "mapgen" +#define CMD_RUN_SCRIPT "run_script" +#define CMD_TIPS "tips" +#define CMD_CUSTOMIZE "customize" +#define CMD_OPTIONS "options" +#define CMD_SELECT_FILE "select_file" + +typedef struct Command Command; + +struct Command +{ + const char *name; + bool (*enabled)(const char *argument); + bool (*selected)(const char *argument); + void (*execute)(const char *argument); + JAccel accel; +}; + +Command *command_get_by_name(const char *name); +Command *command_get_by_key(JMessage msg); + +bool command_is_enabled(Command *command, const char *argument); +bool command_is_selected(Command *command, const char *argument); +void command_execute(Command *command, const char *argument); + +bool command_is_key_pressed(Command *command, JMessage msg); +void command_add_key(Command *command, const char *string); + +#endif /* COMMANDS_COMMANDS_H */ diff --git a/src/console/console.h b/src/console/console.h index c47577081..9d35311c2 100644 --- a/src/console/console.h +++ b/src/console/console.h @@ -1,5 +1,5 @@ /* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005 David A. Capello + * Copyright (C) 2001-2005, 2007 David A. Capello * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,14 +19,14 @@ #ifndef CONSOLE_H #define CONSOLE_H -void console_open (void); -void console_close (void); +void console_open(void); +void console_close(void); -void console_printf (const char *format, ...); -void user_printf (const char *format, ...); +void console_printf(const char *format, ...); +void user_printf(const char *format, ...); -void do_progress (int progress); -void add_progress (int max); -void del_progress (void); +void do_progress(int progress); +void add_progress(int max); +void del_progress(void); #endif /* CONSOLE_H */ diff --git a/src/core/app.c b/src/core/app.c index 11e2fe1d9..6d9cf5eeb 100644 --- a/src/core/app.c +++ b/src/core/app.c @@ -31,6 +31,7 @@ #include "jinete.h" #include "jinete/intern.h" +#include "commands/commands.h" #include "console/console.h" #include "core/app.h" #include "core/cfg.h" @@ -54,23 +55,24 @@ #include "util/recscr.h" #include "widgets/colbar.h" #include "widgets/editor.h" -#include "widgets/menu.h" +#include "widgets/menuitem.h" #include "widgets/statebar.h" #include "widgets/toolbar.h" #endif +/* options */ enum { OPEN_GFX_FILE, DO_SCRIPT_FILE, DO_SCRIPT_EXPR, }; -typedef struct Command +typedef struct Option { int type; char *data; -} Command; +} Option; static char *exe_name; /* name of the program */ @@ -84,14 +86,14 @@ static JWidget status_bar = NULL; /* the status bar widget */ static JWidget color_bar = NULL; /* the color bar widget */ static JWidget tool_bar = NULL; /* the tool bar widget */ -static JList commands; /* list of "Command" structures */ +static JList options; /* list of "Option" structures (options to execute) */ static char *palette_filename = NULL; -static int check_args (int argc, char *argv[]); -static void usage (int status); +static int check_args(int argc, char *argv[]); +static void usage(int status); -static Command *command_new (int type, const char *data); -static void command_free (Command *command); +static Option *option_new(int type, const char *data); +static void option_free(Option *option); /* install and load all initial stuff */ int app_init(int argc, char *argv[]) @@ -99,22 +101,22 @@ int app_init(int argc, char *argv[]) exe_name = argv[0]; /* Initialize language suppport. */ - intl_init (); + intl_init(); /* install the `core' of ASE application */ - if (core_init () < 0) { - user_printf (_("ASE core initialization error.\n")); + if (core_init() < 0) { + user_printf(_("ASE core initialization error.\n")); return -1; } /* init configuration */ - ase_config_init (); + ase_config_init(); /* load the language file */ - intl_load_lang (); + intl_load_lang(); /* search options in the arguments */ - if (check_args (argc, argv) < 0) + if (check_args(argc, argv) < 0) return -1; /* GUI is the default mode */ @@ -161,7 +163,7 @@ int app_init(int argc, char *argv[]) /* runs ASE main dialog */ void app_loop(void) { - Command *command; + Option *option; JLink link; /* initialize GUI interface */ @@ -245,25 +247,25 @@ void app_loop(void) if (!(ase_mode & MODE_GUI)) set_display_switch_mode(SWITCH_BACKAMNESIA); - /* procress commands */ - PRINTF("Processing commands...\n"); + /* procress options */ + PRINTF("Processing options...\n"); - JI_LIST_FOR_EACH(commands, link) { - command = link->data; + JI_LIST_FOR_EACH(options, link) { + option = link->data; - switch (command->type) { + switch (option->type) { case OPEN_GFX_FILE: { Sprite *sprite; /* load the sprite */ - sprite = sprite_load(command->data); + sprite = sprite_load(option->data); if (!sprite) { /* error */ if (ase_mode & MODE_GUI) - jalert(_("Error<data); + jalert(_("Error<data); else - user_printf(_("Error loading file \"%s\"\n"), command->data); + user_printf(_("Error loading file \"%s\"\n"), option->data); } else { /* mount and select the sprite */ @@ -275,24 +277,24 @@ void app_loop(void) set_sprite_in_more_reliable_editor(get_first_sprite()); /* recent file */ - recent_file(command->data); + recent_file(option->data); } } break; } case DO_SCRIPT_FILE: - do_script_file(command->data); + do_script_file(option->data); break; case DO_SCRIPT_EXPR: - do_script_expr(command->data); + do_script_expr(option->data); break; } - command_free(command); + option_free(option); } - jlist_free(commands); + jlist_free(options); /* just batch mode */ if (ase_mode & MODE_BATCH) { @@ -377,7 +379,7 @@ void app_refresh_screen(void) you should use rebuild_sprite_list () instead (src/gui/gui.c) */ void app_realloc_sprite_list(void) { - JWidget list_menuitem = get_sprite_list_menuitem (); + JWidget list_menuitem = get_sprite_list_menuitem(); JWidget menuitem; Sprite *sprite; JLink link; @@ -386,8 +388,10 @@ void app_realloc_sprite_list(void) /* update the sprite-list menu */ if (list_menuitem) { - Sprite *clipboard = get_clipboard_sprite (); + Command *cmd_select_file = command_get_by_name(CMD_SELECT_FILE); + Sprite *clipboard = get_clipboard_sprite(); JWidget submenu; + char buf[256]; int c, count = 0; submenu = jmenuitem_get_submenu (list_menuitem); @@ -396,30 +400,31 @@ void app_realloc_sprite_list(void) jwidget_free (submenu); } - submenu = jmenu_new (); - jmenuitem_set_submenu (list_menuitem, submenu); + submenu = jmenu_new(); + jmenuitem_set_submenu(list_menuitem, submenu); /* for `null' */ - menuitem = menuitem_new (_("Nothing")); - menuitem_set_script (menuitem, "ShowSpriteByID (0)"); + menuitem = menuitem_new(_("Nothing"), cmd_select_file, NULL); - if (!current_sprite) - jwidget_select (menuitem); +/* if (!current_sprite) */ +/* jwidget_select(menuitem); */ - jwidget_add_child (submenu, menuitem); + jwidget_add_child(submenu, menuitem); count++; /* for `clipboard' */ - menuitem = menuitem_new (_("Clipboard")); - menuitem_set_script (menuitem, "ShowSpriteByID (%d)", - clipboard ? clipboard->gfxobj.id: 0); + if (clipboard) + usprintf(buf, "%d", clipboard->gfxobj.id); - if (!clipboard) - jwidget_disable (menuitem); - else if (current_sprite == clipboard) - jwidget_select (menuitem); + menuitem = menuitem_new(_("Clipboard"), cmd_select_file, + clipboard ? buf: NULL); - jwidget_add_child (submenu, menuitem); +/* if (!clipboard) */ +/* jwidget_disable(menuitem); */ +/* else if (current_sprite == clipboard) */ +/* jwidget_select(menuitem); */ + + jwidget_add_child(submenu, menuitem); count++; /* insert a separator */ @@ -432,7 +437,7 @@ void app_realloc_sprite_list(void) } if (c > 0) { - jwidget_add_child (submenu, ji_separator_new (NULL, JI_HORIZONTAL)); + jwidget_add_child(submenu, ji_separator_new(NULL, JI_HORIZONTAL)); count++; /* insert all other sprites */ @@ -445,21 +450,23 @@ void app_realloc_sprite_list(void) /* `count' limit -- XXXX how I know the height of menu-items? */ /* if (count >= SCREEN_H/(text_height (font)+4)-2) { */ if (count >= 14) { - menuitem = menuitem_new (_("More")); - jwidget_add_child (submenu, menuitem); + menuitem = menuitem_new(_("More"), NULL, NULL); + jwidget_add_child(submenu, menuitem); submenu = jmenu_new (); - jmenuitem_set_submenu (menuitem, submenu); + jmenuitem_set_submenu(menuitem, submenu); count = 0; } - menuitem = menuitem_new (get_filename (sprite->filename)); - menuitem_set_script (menuitem, "ShowSpriteByID (%d)", sprite->gfxobj.id); + usprintf(buf, "%d", sprite->gfxobj.id); + + menuitem = menuitem_new(get_filename(sprite->filename), + cmd_select_file, buf); if (current_sprite == sprite) - jwidget_select (menuitem); + jwidget_select(menuitem); - jwidget_add_child (submenu, menuitem); + jwidget_add_child(submenu, menuitem); count++; } } @@ -478,6 +485,7 @@ void app_realloc_recent_list(void) /* update the recent file list menu item */ if (list_menuitem) { + Command *cmd_open_file = command_get_by_name(CMD_OPEN_FILE); JWidget submenu; submenu = jmenuitem_get_submenu (list_menuitem); @@ -486,37 +494,26 @@ void app_realloc_recent_list(void) jwidget_free (submenu); } - submenu = jmenu_new (); - jmenuitem_set_submenu (list_menuitem, submenu); + submenu = jmenu_new(); + jmenuitem_set_submenu(list_menuitem, submenu); if (jlist_first(get_recent_files_list())) { - const char *s, *filename; - char path[1024]; + const char *filename; JLink link; - int ch; JI_LIST_FOR_EACH(get_recent_files_list(), link) { filename = link->data; - ustrcpy(path, empty_string); - - s = filename; - while ((ch = ugetxc(&s))) - if (ch == '\\') - ustrcat(path, "\\\\"); - else - uinsert(path, ustrlen(path), ch); - - menuitem = menuitem_new(get_filename(filename)); - menuitem_set_script(menuitem, "sprite_recent_load (\"%s\")", path); - - jwidget_add_child (submenu, menuitem); + menuitem = menuitem_new(get_filename(filename), + cmd_open_file, + filename); + jwidget_add_child(submenu, menuitem); } } else { - menuitem = menuitem_new (_("Nothing")); - jwidget_disable (menuitem); - jwidget_add_child (submenu, menuitem); + menuitem = menuitem_new(_("Nothing"), NULL, NULL); + jwidget_disable(menuitem); + jwidget_add_child(submenu, menuitem); } } } @@ -557,8 +554,7 @@ void app_switch(JWidget widget) void app_default_status_bar_message(void) { status_bar_set_text(app_get_status_bar(), 250, - "ASE " VERSION ", " - "Copyright (C) 2001-2005 David A. Capello"); + "ASE " VERSION ", " COPYRIGHT); } /* looks the inpunt arguments in the command line */ @@ -567,7 +563,7 @@ static int check_args(int argc, char *argv[]) int i, n, len; char *arg; - commands = jlist_new(); + options = jlist_new(); for (i=1; itype = type; - command->data = jstrdup (data); + option->type = type; + option->data = jstrdup(data); - return command; + return option; } -static void command_free (Command *command) +static void option_free(Option *option) { - jfree (command->data); - jfree (command); + jfree(option->data); + jfree(option); } diff --git a/src/core/app.h b/src/core/app.h index 927436144..47ebf007c 100644 --- a/src/core/app.h +++ b/src/core/app.h @@ -1,5 +1,5 @@ /* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005 David A. Capello + * Copyright (C) 2001-2005, 2007 David A. Capello * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,26 +21,26 @@ #include "jinete/base.h" -int app_init (int argc, char *argv[]); -void app_loop (void); -void app_exit (void); +int app_init(int argc, char *argv[]); +void app_loop(void); +void app_exit(void); -void app_refresh_screen (void); +void app_refresh_screen(void); -void app_realloc_sprite_list (void); -void app_realloc_recent_list (void); +void app_realloc_sprite_list(void); +void app_realloc_recent_list(void); -int app_get_current_image_type (void); +int app_get_current_image_type(void); -JWidget app_get_top_window (void); -JWidget app_get_menu_bar (void); -JWidget app_get_status_bar (void); -JWidget app_get_color_bar (void); -JWidget app_get_tool_bar (void); +JWidget app_get_top_window(void); +JWidget app_get_menu_bar(void); +JWidget app_get_status_bar(void); +JWidget app_get_color_bar(void); +JWidget app_get_tool_bar(void); -void app_switch (JWidget widget); +void app_switch(JWidget widget); -void app_default_status_bar_message (void); +void app_default_status_bar_message(void); #endif /* CORE_APP_H */ diff --git a/src/core/config.c b/src/core/config.c index 0548542ee..81229a2b4 100644 --- a/src/core/config.c +++ b/src/core/config.c @@ -23,6 +23,7 @@ #include "allegro.h" +/* Only for Allegro < 4.2 */ #if ((ALLEGRO_VERSION == 4 && ALLEGRO_SUB_VERSION < 2) || (ALLEGRO_VERSION < 4)) #include "allegro/internal/aintern.h" diff --git a/src/core/core.c b/src/core/core.c index c9978f480..d443fc4d6 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -1,5 +1,5 @@ /* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005 David A. Capello + * Copyright (C) 2001-2005, 2007 David A. Capello * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -51,7 +51,7 @@ static char *log_filename = NULL; static FILE *log_fileptr = NULL; #endif -int core_init (void) +int core_init(void) { #ifdef NEED_LOG char buf[512]; @@ -59,22 +59,22 @@ int core_init (void) DIRS *dirs; for (;;) { - sprintf (buf, "log%04d.txt", count++); - dirs = filename_in_bindir (buf); - if (!exists (dirs->path)) + sprintf(buf, "log%04d.txt", count++); + dirs = filename_in_bindir(buf); + if (!exists(dirs->path)) break; else - dirs_free (dirs); + dirs_free(dirs); } - log_filename = jstrdup (dirs->path); - dirs_free (dirs); + log_filename = jstrdup(dirs->path); + dirs_free(dirs); #endif return 0; } -void core_exit (void) +void core_exit(void) { #ifdef NEED_LOG if (log_fileptr) { @@ -89,7 +89,7 @@ void core_exit (void) #endif } -void verbose_printf (const char *format, ...) +void verbose_printf(const char *format, ...) { if (!(ase_mode & MODE_VERBOSE)) return; @@ -97,28 +97,29 @@ void verbose_printf (const char *format, ...) #ifdef NEED_LOG if (!log_fileptr) if (log_filename) - log_fileptr = fopen (log_filename, "w"); + log_fileptr = fopen(log_filename, "w"); if (log_fileptr) #endif { va_list ap; - va_start (ap, format); + va_start(ap, format); #ifndef NO_STDERR - vfprintf (stderr, format, ap); + vfprintf(stderr, format, ap); + fflush(stderr); #endif #ifdef NEED_LOG - vfprintf (log_fileptr, format, ap); - fflush (log_fileptr); + vfprintf(log_fileptr, format, ap); + fflush(log_fileptr); #endif - va_end (ap); + va_end(ap); } } -bool is_interactive (void) +bool is_interactive(void) { return ase_mode & MODE_GUI; } diff --git a/src/core/core.h b/src/core/core.h index 7d98efd1c..36da4921d 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -30,10 +30,10 @@ enum { extern int ase_mode; -int core_init (void); -void core_exit (void); +int core_init(void); +void core_exit(void); -void verbose_printf (const char *format, ...); -bool is_interactive (void); +void verbose_printf(const char *format, ...); +bool is_interactive(void); #endif /* CORE_H */ diff --git a/src/core/dirs.c b/src/core/dirs.c index 991f44510..98bed93f2 100644 --- a/src/core/dirs.c +++ b/src/core/dirs.c @@ -1,5 +1,5 @@ /* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005 David A. Capello + * Copyright (C) 2001-2005, 2007 David A. Capello * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -124,26 +124,25 @@ DIRS *filename_in_bindir(const char *filename) DIRS *filename_in_datadir(const char *filename) { DIRS *dirs = dirs_new(); - -#if defined UNIX_LIKE || defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS - char buf[1024]; -# if defined UNIX_LIKE +#if defined UNIX_LIKE /* $HOME/.ase/filename */ sprintf(buf, ".ase/%s", filename); dirs_cat_dirs(dirs, filename_in_homedir(buf)); -# ifdef DEFAULT_PREFIX + /* $BINDIR/data/filename */ + sprintf(buf, "data/%s", filename); + dirs_cat_dirs(dirs, filename_in_bindir(buf)); + + #ifdef DEFAULT_PREFIX + /* $PREFIX/ase/filename */ + sprintf(buf, "%s/share/ase/%s", DEFAULT_PREFIX, filename); + dirs_add_path(dirs, buf); + #endif - /* $PREFIX/ase/filename */ - sprintf(buf, "%s/share/ase/%s", DEFAULT_PREFIX, filename); - dirs_add_path(dirs, buf); - -# endif - -# endif +#elif defined ALLEGRO_WINDOWS || defined ALLEGRO_DOS /* $BINDIR/data/filename */ sprintf(buf, "data/%s", filename); diff --git a/src/core/dirs.h b/src/core/dirs.h index d2a8cdd96..e39a3fcb3 100644 --- a/src/core/dirs.h +++ b/src/core/dirs.h @@ -1,5 +1,5 @@ /* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005 David A. Capello + * Copyright (C) 2001-2005, 2007 David A. Capello * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,8 +18,8 @@ #ifndef CORE_DIRS_H #define CORE_DIRS_H - -typedef struct DIRS DIRS; + +typedef struct DIRS DIRS; struct DIRS { diff --git a/src/core/modules.h b/src/core/modules.h index e7c74d119..207ec1140 100644 --- a/src/core/modules.h +++ b/src/core/modules.h @@ -1,5 +1,5 @@ /* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005 David A. Capello + * Copyright (C) 2001-2005, 2007 David A. Capello * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,8 +22,8 @@ #define REQUIRE_INTERFACE 1 #define REQUIRE_SCRIPTING 2 -int modules_init (int requirements); -void modules_exit (void); +int modules_init(int requirements); +void modules_exit(void); #endif /* CORE_MODULES_H */ diff --git a/src/dialogs/filmedit.c b/src/dialogs/filmedit.c index 6215b2ed1..b0196673c 100644 --- a/src/dialogs/filmedit.c +++ b/src/dialogs/filmedit.c @@ -117,59 +117,59 @@ void switch_between_film_and_sprite_editor (void) if (!is_interactive ()) return; - window = jwindow_new_desktop (); - box1 = jbox_new (JI_VERTICAL); - panel1 = ji_panel_new (JI_HORIZONTAL); - layer_view = jview_new (); - frame_view = jview_new (); - layer_box = layer_box_new (); - frame_box = frame_box_new (); + window = jwindow_new_desktop(); + box1 = jbox_new(JI_VERTICAL); + panel1 = jpanel_new(JI_HORIZONTAL); + layer_view = jview_new(); + frame_view = jview_new(); + layer_box = layer_box_new(); + frame_box = frame_box_new(); - layer_box_data (layer_box)->frame_box = frame_box_data (frame_box); - frame_box_data (frame_box)->layer_box = layer_box_data (layer_box); + layer_box_data(layer_box)->frame_box = frame_box_data(frame_box); + frame_box_data(frame_box)->layer_box = layer_box_data(layer_box); - jwidget_expansive (panel1, TRUE); + jwidget_expansive(panel1, TRUE); - jview_attach (layer_view, layer_box); - jview_attach (frame_view, frame_box); - jview_without_bars (layer_view); - jview_without_bars (frame_view); + jview_attach(layer_view, layer_box); + jview_attach(frame_view, frame_box); + jview_without_bars(layer_view); + jview_without_bars(frame_view); - jwidget_add_child (panel1, layer_view); - jwidget_add_child (panel1, frame_view); - jwidget_add_child (box1, panel1); - jwidget_add_child (window, box1); + jwidget_add_child(panel1, layer_view); + jwidget_add_child(panel1, frame_view); + jwidget_add_child(box1, panel1); + jwidget_add_child(window, box1); /* load window configuration */ - ji_panel_set_pos (panel1, get_config_float ("LayerWindow", "PanelPos", 50)); - jwindow_remap (window); + jpanel_set_pos(panel1, get_config_float ("LayerWindow", "PanelPos", 50)); + jwindow_remap(window); /* center scrolls in selected layer/frpos */ if (sprite->layer) { JWidget widget = layer_view; - JRect vp1 = jview_get_viewport_position (layer_view); - JRect vp2 = jview_get_viewport_position (frame_view); + JRect vp1 = jview_get_viewport_position(layer_view); + JRect vp2 = jview_get_viewport_position(frame_view); int y, pos; - get_layer_pos (sprite->set, sprite->layer, &pos); + get_layer_pos(sprite->set, sprite->layer, &pos); y = LAYSIZE+LAYSIZE*pos+LAYSIZE/2-jrect_h(vp1)/2; - jview_set_scroll (layer_view, 0, y); - jview_set_scroll (frame_view, - sprite->frpos*FRMSIZE+FRMSIZE/2-jrect_w(vp2)/2, y); + jview_set_scroll(layer_view, 0, y); + jview_set_scroll(frame_view, + sprite->frpos*FRMSIZE+FRMSIZE/2-jrect_w(vp2)/2, y); - jrect_free (vp1); - jrect_free (vp2); + jrect_free(vp1); + jrect_free(vp2); } /* show the window */ - jwindow_open_fg (window); + jwindow_open_fg(window); /* save window configuration */ - set_config_float ("LayerWindow", "PanelPos", ji_panel_get_pos (panel1)); + set_config_float("LayerWindow", "PanelPos", jpanel_get_pos(panel1)); /* destroy the window */ - jwidget_free (window); + jwidget_free(window); /* destroy thumbnails */ destroy_thumbnails(); diff --git a/src/dialogs/tips.c b/src/dialogs/tips.c index 3d1ecc2d8..05e5349a4 100644 --- a/src/dialogs/tips.c +++ b/src/dialogs/tips.c @@ -220,9 +220,9 @@ static void tips_request_size(JWidget widget, int *w, int *h) static JWidget tips_image_new(BITMAP *bmp) { - JWidget widget = ji_image_new (bmp, JI_CENTER | JI_MIDDLE); + JWidget widget = jimage_new(bmp, JI_CENTER | JI_MIDDLE); jwidget_add_hook(widget, tips_image_type (), - tips_image_msg_proc, bmp); + tips_image_msg_proc, bmp); return widget; } diff --git a/src/file/png_file.c b/src/file/png_file.c index 75b0292a7..951f5056d 100644 --- a/src/file/png_file.c +++ b/src/file/png_file.c @@ -123,7 +123,7 @@ static Sprite *load_png(const char *filename) * was compiled with a compatible version of the library */ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, - report_png_error, report_png_error); + report_png_error, report_png_error); if (png_ptr == NULL) { console_printf("png_create_read_struct\n"); fclose(fp); diff --git a/src/modules/color.h b/src/modules/color.h index 24ba9b580..e565579f3 100644 --- a/src/modules/color.h +++ b/src/modules/color.h @@ -1,5 +1,5 @@ /* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005 David A. Capello + * Copyright (C) 2001-2005, 2007 David A. Capello * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,38 +32,38 @@ enum { COLOR_TYPE_INDEX, }; -int init_module_color (void); -void exit_module_color (void); +int init_module_color(void); +void exit_module_color(void); -const char *get_fg_color (void); -const char *get_bg_color (void); -void set_fg_color (const char *string); -void set_bg_color (const char *string); +const char *get_fg_color(void); +const char *get_bg_color(void); +void set_fg_color(const char *string); +void set_bg_color(const char *string); -int color_type (const char *color); -char *color_mask (void); -char *color_rgb (int r, int g, int b, int a); -char *color_gray (int g, int a); -char *color_index (int index); -int color_get_black (int imgtype, const char *color); -int color_get_red (int imgtype, const char *color); -int color_get_green (int imgtype, const char *color); -int color_get_blue (int imgtype, const char *color); -int color_get_index (int imgtype, const char *color); -int color_get_alpha (int imgtype, const char *color); -void color_set_alpha (char **color, int alpha); -char *color_from_image (int imgtype, int c); +int color_type(const char *color); +char *color_mask(void); +char *color_rgb(int r, int g, int b, int a); +char *color_gray(int g, int a); +char *color_index(int index); +int color_get_black(int imgtype, const char *color); +int color_get_red(int imgtype, const char *color); +int color_get_green(int imgtype, const char *color); +int color_get_blue(int imgtype, const char *color); +int color_get_index(int imgtype, const char *color); +int color_get_alpha(int imgtype, const char *color); +void color_set_alpha(char **color, int alpha); +char *color_from_image(int imgtype, int c); -int blackandwhite (int r, int g, int b); -int blackandwhite_neg (int r, int g, int b); +int blackandwhite(int r, int g, int b); +int blackandwhite_neg(int r, int g, int b); -int get_color_for_allegro (int depth, const char *color); -int get_color_for_image (int imgtype, const char *color); -char *image_getpixel_color (struct Image *image, int x, int y); -void color_to_formalstring (int imgtype, const char *color, char *buf, - int size, int long_format); -void draw_color (struct BITMAP *bmp, int x1, int y1, int x2, int y2, - int imgtype, const char *color); +int get_color_for_allegro(int depth, const char *color); +int get_color_for_image(int imgtype, const char *color); +char *image_getpixel_color(struct Image *image, int x, int y); +void color_to_formalstring(int imgtype, const char *color, char *buf, + int size, int long_format); +void draw_color(struct BITMAP *bmp, int x1, int y1, int x2, int y2, + int imgtype, const char *color); #endif /* MODULES_COLOR_H */ diff --git a/src/modules/editors.c b/src/modules/editors.c index e382e5157..d461115a9 100644 --- a/src/modules/editors.c +++ b/src/modules/editors.c @@ -41,12 +41,12 @@ JWidget box_editors = NULL; static JList editors; /* list of "Editor" structures */ -static int is_sprite_in_some_editor (Sprite *sprite); -static Sprite *get_more_reliable_sprite (void); -static JWidget find_next_editor (JWidget widget); -static int count_parents (JWidget widget); +static int is_sprite_in_some_editor(Sprite *sprite); +static Sprite *get_more_reliable_sprite(void); +static JWidget find_next_editor(JWidget widget); +static int count_parents(JWidget widget); -int init_module_editors (void) +int init_module_editors(void) { editors = jlist_new(); return 0; @@ -269,7 +269,7 @@ void split_editor(JWidget editor, int align) /* create a new box to contain both editors, and a new view to put the new editor */ - new_panel = ji_panel_new(align); + new_panel = jpanel_new(align); new_view = editor_view_new(); new_editor = create_new_editor(); diff --git a/src/modules/gui.c b/src/modules/gui.c index b9310bf9f..57177163c 100644 --- a/src/modules/gui.c +++ b/src/modules/gui.c @@ -26,6 +26,7 @@ #include "jinete.h" #include "jinete/intern.h" +#include "commands/commands.h" #include "console/console.h" #include "core/app.h" #include "core/cfg.h" @@ -117,6 +118,7 @@ int init_module_gui(void) #if !defined(ALLEGRO_DOS) three_finger_flag = FALSE; #endif + three_finger_flag = TRUE; /* TODO remove this line */ /* set the graphics mode... */ load_gui_config(&w, &h, &bpp, &fullscreen); @@ -684,36 +686,71 @@ static bool manager_msg_proc(JWidget widget, JMessage msg) gui_feedback(); break; - case JM_CHAR: - if (check_for_accel(ACCEL_FOR_SCREENSHOT, msg)) { + case JM_CHAR: { + Command *command = command_get_by_key(msg); + + /* the screen shot is available in everywhere */ + if (strcmp(command->name, CMD_SCREEN_SHOT) == 0) { screen_shot(); return TRUE; } - else if (check_for_accel(ACCEL_FOR_FILMEDITOR, msg)) { - if (current_sprite) { - JWidget child; - JLink link; - bool dofilm = FALSE; + /* all other keys are only available in the main-window */ + else { + JWidget child; + JLink link; - JI_LIST_FOR_EACH(widget->children, link) { - child = link->data; + JI_LIST_FOR_EACH(widget->children, link) { + child = link->data; - if (jwindow_is_foreground(child)) { - break; - } - else if (jwindow_is_desktop(child) && child == app_get_top_window()) { - dofilm = TRUE; - break; - } + /* there are a foreground window executing? */ + if (jwindow_is_foreground(child)) { + break; } - - if (dofilm) { - switch_between_film_and_sprite_editor(); - return TRUE; + /* is it the desktop and the top-window= */ + else if (jwindow_is_desktop(child) && child == app_get_top_window()) { + /* ok, so we can execute the command represented by the + pressed-key in the message... */ + if (command) { + if (command_is_enabled(command, NULL)) { + command_execute(command, NULL); + return TRUE; + } + } + break; } } } break; + } + /* TODO remove this */ +/* if (check_for_accel(ACCEL_FOR_SCREENSHOT, msg)) { */ +/* screen_shot(); */ +/* return TRUE; */ +/* } */ +/* else if (check_for_accel(ACCEL_FOR_FILMEDITOR, msg)) { */ +/* if (current_sprite) { */ +/* JWidget child; */ +/* JLink link; */ +/* bool dofilm = FALSE; */ + +/* JI_LIST_FOR_EACH(widget->children, link) { */ +/* child = link->data; */ + +/* if (jwindow_is_foreground(child)) { */ +/* break; */ +/* } */ +/* else if (jwindow_is_desktop(child) && child == app_get_top_window()) { */ +/* dofilm = TRUE; */ +/* break; */ +/* } */ +/* } */ + +/* if (dofilm) { */ +/* switch_between_film_and_sprite_editor(); */ +/* return TRUE; */ +/* } */ +/* } */ +/* } */ } return FALSE; diff --git a/src/modules/rootmenu.c b/src/modules/rootmenu.c index 798164e30..ca89896eb 100644 --- a/src/modules/rootmenu.c +++ b/src/modules/rootmenu.c @@ -1,5 +1,5 @@ /* ase -- allegro-sprite-editor: the ultimate sprites factory - * Copyright (C) 2001-2005 David A. Capello + * Copyright (C) 2001-2005, 2007 David A. Capello * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,6 +25,8 @@ #include "jinete.h" +#include "commands/commands.h" +#include "console/console.h" #include "core/app.h" #include "core/core.h" #include "core/dirs.h" @@ -32,7 +34,7 @@ #include "modules/chkmthds.h" #include "modules/rootmenu.h" #include "util/filetoks.h" -#include "widgets/menu.h" +#include "widgets/menuitem.h" #endif @@ -45,17 +47,21 @@ static JWidget frame_popup_menuitem; static JWidget filters_popup_menuitem; static JWidget accel_menuitem[ACCEL_MAX]; -static JAccel read_accel (FILE *f, char *buf, char *leavings, int sizeof_leavings); -static JWidget read_menu (FILE *f, char *leavings, int sizeof_leavings); +/* static JAccel read_accel(FILE *f, char *buf, char *leavings, int sizeof_leavings); */ +/* static JWidget read_menu(FILE *f, char *leavings, int sizeof_leavings); */ -int init_module_rootmenu (void) +static JWidget convert_xmlelem_to_menu(JXmlElem elem); +static JWidget convert_xmlelem_to_menuitem(JXmlElem elem); +static void apply_shortcut_to_menuitems_with_command(JWidget menu, Command *command); + +int init_module_rootmenu(void) { root_menu = 0; - return load_root_menu (); + return load_root_menu(); } -void exit_module_rootmenu (void) +void exit_module_rootmenu(void) { sprite_list_menuitem = 0; recent_list_menuitem = 0; @@ -63,250 +69,486 @@ void exit_module_rootmenu (void) frame_popup_menuitem = 0; filters_popup_menuitem = 0; - jwidget_free (root_menu); + jwidget_free(root_menu); } -int load_root_menu (void) +int load_root_menu(void) { - char leavings[4096]; - char buf[512]; + JLink link, link2; DIRS *dirs, *dir; - JWidget menuitem; - int ret = -1; - FILE *f; + JXmlElem elem; + JXml xml; - if (app_get_menu_bar ()) - jmenubar_set_menu (app_get_menu_bar (), 0); + if (app_get_menu_bar()) + jmenubar_set_menu(app_get_menu_bar(), NULL); /* destroy `root-menu' if it exists */ if (root_menu) - jwidget_free (root_menu); + jwidget_free(root_menu); /* create a new empty-menu */ - root_menu = jmenu_new (); + root_menu = NULL; sprite_list_menuitem = 0; recent_list_menuitem = 0; layer_popup_menuitem = 0; frame_popup_menuitem = 0; filters_popup_menuitem = 0; - sprintf (buf, "menus.%s", intl_get_lang ()); - dirs = filename_in_datadir (buf); + dirs = filename_in_datadir("usergui.xml"); + dirs_cat_dirs(dirs, filename_in_datadir("defgui.xml")); for (dir=dirs; dir; dir=dir->next) { - /* open the menu definition file */ - f = fopen (dir->path, "r"); - if (f) { - tok_reset_line_num (); - strcpy (leavings, ""); + PRINTF("Trying to load GUI definition file from \"%s\"...\n", dir->path); + + /* open the XML menu definition file */ + xml = jxml_new_from_file(dir->path); + if (xml && jxml_get_root(xml)) { + /**************************************************/ + /* load menus */ + PRINTF("Trying to menus from \"%s\"...\n", dir->path); - /* read other menu */ - while ((menuitem = read_menu (f, leavings, sizeof (leavings)))) { - /* insert it to the root menu */ - jwidget_add_child (root_menu, menuitem); + /* get the element with id="main_menu" */ + elem = jxml_get_elem_by_id(xml, "main_menu"); + if (elem) { + /* is it a element? */ + if (strcmp(jxmlelem_get_name(elem), "menu") == 0) { + /* ok, convert it to a menu JWidget */ + root_menu = convert_xmlelem_to_menu(elem); + if (!root_menu) { + PRINTF("Error loading main menu from \"%s\" file.\n", dir->path); + return -1; + } + } + else { + PRINTF("Invalid element with id=\"main_menu\" in \"%s\"\n", dir->path); + return -1; + } + } + else { + PRINTF("main_menu element couldn't be found...\n"); } - /* close the file */ - fclose (f); - ret = 0; + /**************************************************/ + /* load keyboard shortcuts */ + PRINTF("Trying to load keyboard shortcuts from \"%s\"...\n", dir->path); + /* find the element */ + JI_LIST_FOR_EACH(((JXmlNode)jxml_get_root(xml))->children, link) { + JXmlNode child = (JXmlNode)link->data; + + /* is it ? */ + if (child->type == JI_XML_ELEM && + strcmp(jxmlelem_get_name((JXmlElem)child), "keyboard") == 0) { + + /* for each children in ... */ + JI_LIST_FOR_EACH(child->children, link2) { + JXmlNode child2 = (JXmlNode)link2->data; + + /* it is a element? */ + if (child2->type == JI_XML_ELEM && + strcmp(jxmlelem_get_name((JXmlElem)child2), "key") == 0) { + /* finally, we can read the */ + const char *command_name = jxmlelem_get_attr((JXmlElem)child2, "command"); + const char *command_key = jxmlelem_get_attr((JXmlElem)child2, "shortcut"); + if (command_name && command_key) { + Command *command = command_get_by_name(command_name); + if (command) { + bool first_shortcut = !command->accel; + + /* add the keyboard shortcut to the command */ + command_add_key(command, command_key); + + /* add the shortcut to the menuitems with this + command (this is only visual, the + "manager_msg_proc" is the only one that process + keyboard shortcuts) */ + if (first_shortcut) + apply_shortcut_to_menuitems_with_command(root_menu, command); + } + } + } + } + break; + } + } + + /* free the XML file */ + jxml_free(xml); + } + + if (root_menu) { + PRINTF("Main menu loaded.\n"); break; } } - dirs_free (dirs); + dirs_free(dirs); - /* sets the "menu" of the "menu-bar" to the new "root-menu" */ - if (app_get_menu_bar ()) { - jmenubar_set_menu (app_get_menu_bar (), root_menu); - jwindow_remap (app_get_top_window ()); - jwidget_dirty (app_get_top_window ()); + /* no menus? */ + if (!root_menu) { + user_printf(_("Error loading main menu\n")); + return -1; } - return ret; + /* sets the "menu" of the "menu-bar" to the new "root-menu" */ + if (app_get_menu_bar()) { + jmenubar_set_menu(app_get_menu_bar(), root_menu); + jwindow_remap(app_get_top_window()); + jwidget_dirty(app_get_top_window()); + } + + return 0; } -JWidget get_root_menu (void) { return root_menu; } +/* int load_root_menu(void) */ +/* { */ +/* char leavings[4096]; */ +/* char buf[512]; */ +/* DIRS *dirs, *dir; */ +/* JWidget menuitem; */ +/* int ret = -1; */ +/* FILE *f; */ -JWidget get_sprite_list_menuitem (void) { return sprite_list_menuitem; } -JWidget get_recent_list_menuitem (void) { return recent_list_menuitem; } -JWidget get_layer_popup_menuitem (void) { return layer_popup_menuitem; } -JWidget get_frame_popup_menuitem (void) { return frame_popup_menuitem; } +/* if (app_get_menu_bar()) */ +/* jmenubar_set_menu(app_get_menu_bar(), NULL); */ -int check_for_accel (int accel_type, JMessage msg) +/* /\* destroy `root-menu' if it exists *\/ */ +/* if (root_menu) */ +/* jwidget_free(root_menu); */ + +/* /\* create a new empty-menu *\/ */ +/* root_menu = jmenu_new(); */ +/* sprite_list_menuitem = 0; */ +/* recent_list_menuitem = 0; */ +/* layer_popup_menuitem = 0; */ +/* frame_popup_menuitem = 0; */ +/* filters_popup_menuitem = 0; */ + +/* sprintf(buf, "menus.%s", intl_get_lang()); */ +/* dirs = filename_in_datadir(buf); */ + +/* for (dir=dirs; dir; dir=dir->next) { */ +/* /\* open the menu definition file *\/ */ +/* f = fopen(dir->path, "r"); */ +/* if (f) { */ +/* tok_reset_line_num(); */ +/* strcpy(leavings, ""); */ + +/* /\* read other menu *\/ */ +/* while ((menuitem = read_menu (f, leavings, sizeof (leavings)))) { */ +/* /\* insert it to the root menu *\/ */ +/* jwidget_add_child (root_menu, menuitem); */ +/* } */ + +/* /\* close the file *\/ */ +/* fclose (f); */ +/* ret = 0; */ + +/* break; */ +/* } */ +/* } */ + +/* dirs_free (dirs); */ + +/* /\* sets the "menu" of the "menu-bar" to the new "root-menu" *\/ */ +/* if (app_get_menu_bar ()) { */ +/* jmenubar_set_menu (app_get_menu_bar (), root_menu); */ +/* jwindow_remap (app_get_top_window ()); */ +/* jwidget_dirty (app_get_top_window ()); */ +/* } */ + +/* return ret; */ +/* } */ + +JWidget get_root_menu(void) { return root_menu; } + +JWidget get_sprite_list_menuitem(void) { return sprite_list_menuitem; } +JWidget get_recent_list_menuitem(void) { return recent_list_menuitem; } +JWidget get_layer_popup_menuitem(void) { return layer_popup_menuitem; } +JWidget get_frame_popup_menuitem(void) { return frame_popup_menuitem; } + +int check_for_accel(int accel_type, JMessage msg) { if (accel_menuitem[accel_type]) { - JAccel accel = jmenuitem_get_accel (accel_menuitem[accel_type]); + JAccel accel = jmenuitem_get_accel(accel_menuitem[accel_type]); if (accel) - return jaccel_check (accel, - msg->any.shifts, - msg->key.ascii, - msg->key.scancode); + return jaccel_check(accel, + msg->any.shifts, + msg->key.ascii, + msg->key.scancode); } return FALSE; } -void show_filters_popup_menu (void) +void show_fx_popup_menu(void) { - if (is_interactive () && + if (is_interactive() && filters_popup_menuitem && - jmenuitem_get_submenu (filters_popup_menuitem)) { - jmenu_popup (jmenuitem_get_submenu (filters_popup_menuitem), - ji_mouse_x (0), - ji_mouse_y (0)); + jmenuitem_get_submenu(filters_popup_menuitem)) { + jmenu_popup(jmenuitem_get_submenu(filters_popup_menuitem), + ji_mouse_x(0), + ji_mouse_y(0)); } } -/* reads keyboard shortcuts */ -static JAccel read_accel (FILE *f, char *buf, char *leavings, int sizeof_leavings) +/* static JAccel read_accel(FILE *f, char *buf, char *leavings, int sizeof_leavings) */ +/* { */ +/* char keybuf[256]; */ +/* JAccel accel; */ + +/* strcpy (keybuf, ""); */ + +/* while (tok_read (f, buf, leavings, sizeof_leavings)) { */ +/* if (strcmp (buf, ";") == 0) */ +/* break; */ +/* else */ +/* sprintf (keybuf+strlen (keybuf), " %s", buf); */ +/* } */ + +/* accel = jaccel_new (); */ +/* jaccel_add_keys_from_string (accel, keybuf); */ + +/* if (jaccel_is_empty (accel)) { */ +/* jaccel_free (accel); */ +/* accel = NULL; */ +/* } */ + +/* return accel; */ +/* } */ + +/* /\* reads a new menu *\/ */ +/* static JWidget read_menu (FILE *f, char *leavings, int sizeof_leavings) */ +/* { */ +/* char buf[1024*4]; */ +/* int read_to_end; */ +/* JWidget menuitem; */ + +/* /\* read the name of the menu, *\/ */ +/* if (!tok_read (f, buf, leavings, sizeof_leavings)) */ +/* /\* no name, end of the file *\/ */ +/* return 0; */ + +/* /\* a separator *\/ */ +/* if (strcmp (buf, "----") == 0) */ +/* return ji_separator_new (NULL, JI_HORIZONTAL); */ +/* /\* close a menu item *\/ */ +/* else if (strcmp(buf, "}") == 0) */ +/* return 0; */ + +/* /\* create the item *\/ */ +/* menuitem = menuitem_new(buf, NULL, NULL); */ +/* if (!menuitem) */ +/* return 0; */ + +/* /\* read next token *\/ */ +/* tok_read (f, buf, leavings, sizeof_leavings); */ +/* read_to_end = FALSE; */ + +/* /\* could be a menu name *\/ */ +/* if ((strcmp (buf, "{") != 0) && */ +/* (strcmp (buf, "=") != 0)) { */ +/* /\* yes, this token is a menu name... *\/ */ + +/* /\* sprite list menu *\/ */ +/* if (strcmp (buf, "SPRITE_LIST") == 0) { */ +/* sprite_list_menuitem = menuitem; */ +/* read_to_end = TRUE; */ +/* } */ +/* /\* recent list menu *\/ */ +/* else if (strcmp (buf, "RECENT_LIST") == 0) { */ +/* recent_list_menuitem = menuitem; */ +/* read_to_end = TRUE; */ +/* } */ +/* /\* layer popup menu *\/ */ +/* else if (strcmp (buf, "LAYER_POPUP") == 0) */ +/* layer_popup_menuitem = menuitem; */ +/* /\* frame popup menu *\/ */ +/* else if (strcmp (buf, "FRAME_POPUP") == 0) */ +/* frame_popup_menuitem = menuitem; */ +/* /\* filters popup menu *\/ */ +/* else if (strcmp (buf, "FILTERS_POPUP") == 0) */ +/* filters_popup_menuitem = menuitem; */ +/* /\* accelerator keys *\/ */ +/* else if (strcmp (buf, "UNDO_ACCEL") == 0) */ +/* accel_menuitem[ACCEL_FOR_UNDO] = menuitem; */ +/* else if (strcmp (buf, "REDO_ACCEL") == 0) */ +/* accel_menuitem[ACCEL_FOR_REDO] = menuitem; */ +/* else if (strcmp (buf, "FILMEDITOR_ACCEL") == 0) */ +/* accel_menuitem[ACCEL_FOR_FILMEDITOR] = menuitem; */ +/* else if (strcmp (buf, "SCREENSHOT_ACCEL") == 0) */ +/* accel_menuitem[ACCEL_FOR_SCREENSHOT] = menuitem; */ + +/* /\* read other token *\/ */ +/* tok_read (f, buf, leavings, sizeof_leavings); */ +/* } */ + +/* /\* sub-menu *\/ */ +/* if (strcmp (buf, "{") == 0) { */ +/* JWidget sub_menuitem; */ +/* JWidget sub_menu; */ + +/* /\* create the sub-menu *\/ */ +/* sub_menu = jmenu_new (); */ +/* if (!sub_menu) */ +/* return menuitem; */ + +/* jmenuitem_set_submenu (menuitem, sub_menu); */ + +/* /\* read other menu *\/ */ +/* while ((sub_menuitem = read_menu (f, leavings, sizeof_leavings))) { */ +/* /\* insert it to the root menu *\/ */ +/* jwidget_add_child (sub_menu, sub_menuitem); */ +/* } */ +/* } */ +/* /\* just a item *\/ */ +/* else if (strcmp (buf, "=") == 0) { */ +/* JAccel accel; */ + +/* /\* read the check method name *\/ */ +/* tok_read (f, buf, leavings, sizeof_leavings); */ + +/* /\* none *\/ */ +/* if (strcmp (buf, ";") == 0) */ +/* return menuitem; */ + +/* /\* search the `check' method *\/ */ +/* menuitem_set_check_method (menuitem, get_check_method (buf)); */ + +/* /\* read the command script *\/ */ +/* tok_read (f, buf, leavings, sizeof_leavings); */ +/* if (strcmp (buf, ";") == 0) */ +/* return menuitem; */ + +/* menuitem_set_script (menuitem, buf); */ + +/* accel = read_accel (f, buf, leavings, sizeof_leavings); */ +/* if (accel) */ +/* jmenuitem_set_accel (menuitem, accel); */ +/* } */ +/* /\* well... *\/ */ +/* else if (strcmp (buf, ";") != 0) { */ +/* /\* Read to end? *\/ */ +/* if (read_to_end) { */ +/* /\* Jump all to the next ";" *\/ */ +/* while (tok_read (f, buf, leavings, sizeof_leavings)) */ +/* if (strcmp (buf, ";") == 0) */ +/* break; */ +/* } */ +/* /\* invalid syntaxis *\/ */ +/* else { */ +/* jwidget_free (menuitem); */ +/* return 0; */ +/* } */ +/* } */ + +/* return menuitem; */ +/* } */ + +static JWidget convert_xmlelem_to_menu(JXmlElem elem) { - char keybuf[256]; - JAccel accel; - - strcpy (keybuf, ""); - - while (tok_read (f, buf, leavings, sizeof_leavings)) { - if (strcmp (buf, ";") == 0) - break; - else - sprintf (keybuf+strlen (keybuf), " %s", buf); - } - - accel = jaccel_new (); - jaccel_add_keys_from_string (accel, keybuf); - - if (jaccel_is_empty (accel)) { - jaccel_free (accel); - accel = NULL; - } - - return accel; -} - -/* reads a new menu */ -static JWidget read_menu (FILE *f, char *leavings, int sizeof_leavings) -{ - char buf[1024*4]; - int read_to_end; + JWidget menu = jmenu_new(); JWidget menuitem; + JLink link; - /* read the name of the menu, */ - if (!tok_read (f, buf, leavings, sizeof_leavings)) - /* no name, end of the file */ - return 0; + JI_LIST_FOR_EACH(((JXmlNode)elem)->children, link) { + JXmlNode child = (JXmlNode)link->data; - /* a separator */ - if (strcmp (buf, "----") == 0) - return ji_separator_new (NULL, JI_HORIZONTAL); - /* close a menu item */ - else if (strcmp (buf, "}") == 0) - return 0; + PRINTF("convert_xmlelem_to_menu: child->value = %p (%s)\n", + child->value, child->value ? child->value: ""); + + if (child->type == JI_XML_ELEM) { + menuitem = convert_xmlelem_to_menuitem((JXmlElem)child); + if (menuitem) + jwidget_add_child(menu, menuitem); + else { + PRINTF("Error converting the element \"%s\" to a menu-item.\n", + jxmlelem_get_name((JXmlElem)child)); + return NULL; + } + } + } + + return menu; +} + +static JWidget convert_xmlelem_to_menuitem(JXmlElem elem) +{ + JWidget menuitem; + const char *id; + + /* is it a separator? */ + if (strcmp(jxmlelem_get_name(elem), "separator") == 0) + return ji_separator_new(NULL, JI_HORIZONTAL); /* create the item */ - menuitem = menuitem_new (buf); + menuitem = menuitem_new(jxmlelem_get_attr(elem, "name"), + command_get_by_name(jxmlelem_get_attr(elem, + "command")), + NULL); if (!menuitem) return 0; - /* read next token */ - tok_read (f, buf, leavings, sizeof_leavings); - read_to_end = FALSE; - - /* could be a menu name */ - if ((strcmp (buf, "{") != 0) && - (strcmp (buf, "=") != 0)) { - /* yes, this token is a menu name... */ - - /* sprite list menu */ - if (strcmp (buf, "SPRITE_LIST") == 0) { + /* has it a ID? */ + id = jxmlelem_get_attr(elem, "id"); + if (id) { + if (strcmp(id, "sprite_list") == 0) { sprite_list_menuitem = menuitem; - read_to_end = TRUE; } /* recent list menu */ - else if (strcmp (buf, "RECENT_LIST") == 0) { + else if (strcmp(id, "recent_list") == 0) { recent_list_menuitem = menuitem; - read_to_end = TRUE; } /* layer popup menu */ - else if (strcmp (buf, "LAYER_POPUP") == 0) + else if (strcmp(id, "layer_popup") == 0) { layer_popup_menuitem = menuitem; + } /* frame popup menu */ - else if (strcmp (buf, "FRAME_POPUP") == 0) + else if (strcmp(id, "frame_popup") == 0) { frame_popup_menuitem = menuitem; + } /* filters popup menu */ - else if (strcmp (buf, "FILTERS_POPUP") == 0) + else if (strcmp(id, "fx_popup") == 0) { filters_popup_menuitem = menuitem; - /* accelerator keys */ - else if (strcmp (buf, "UNDO_ACCEL") == 0) - accel_menuitem[ACCEL_FOR_UNDO] = menuitem; - else if (strcmp (buf, "REDO_ACCEL") == 0) - accel_menuitem[ACCEL_FOR_REDO] = menuitem; - else if (strcmp (buf, "FILMEDITOR_ACCEL") == 0) - accel_menuitem[ACCEL_FOR_FILMEDITOR] = menuitem; - else if (strcmp (buf, "SCREENSHOT_ACCEL") == 0) - accel_menuitem[ACCEL_FOR_SCREENSHOT] = menuitem; - - /* read other token */ - tok_read (f, buf, leavings, sizeof_leavings); + } } - /* sub-menu */ - if (strcmp (buf, "{") == 0) { - JWidget sub_menuitem; + /* has it a sub-menu? */ + if (strcmp(jxmlelem_get_name(elem), "menu") == 0) { JWidget sub_menu; /* create the sub-menu */ - sub_menu = jmenu_new (); - if (!sub_menu) + sub_menu = convert_xmlelem_to_menu(elem); + if (!sub_menu) { + PRINTF("Error reading the sub-menu\n"); return menuitem; - - jmenuitem_set_submenu (menuitem, sub_menu); - - /* read other menu */ - while ((sub_menuitem = read_menu (f, leavings, sizeof_leavings))) { - /* insert it to the root menu */ - jwidget_add_child (sub_menu, sub_menuitem); } - } - /* just a item */ - else if (strcmp (buf, "=") == 0) { - JAccel accel; - /* read the check method name */ - tok_read (f, buf, leavings, sizeof_leavings); - - /* none */ - if (strcmp (buf, ";") == 0) - return menuitem; - - /* search the `check' method */ - menuitem_set_check_method (menuitem, get_check_method (buf)); - - /* read the command script */ - tok_read (f, buf, leavings, sizeof_leavings); - if (strcmp (buf, ";") == 0) - return menuitem; - - menuitem_set_script (menuitem, buf); - - accel = read_accel (f, buf, leavings, sizeof_leavings); - if (accel) - jmenuitem_set_accel (menuitem, accel); - } - /* well... */ - else if (strcmp (buf, ";") != 0) { - /* Read to end? */ - if (read_to_end) { - /* Jump all to the next ";" */ - while (tok_read (f, buf, leavings, sizeof_leavings)) - if (strcmp (buf, ";") == 0) - break; - } - /* invalid syntaxis */ - else { - jwidget_free (menuitem); - return 0; - } + jmenuitem_set_submenu(menuitem, sub_menu); } return menuitem; } + +static void apply_shortcut_to_menuitems_with_command(JWidget menu, Command *command) +{ + JList children = jwidget_get_children(menu); + JWidget menuitem, submenu; + JLink link; + + JI_LIST_FOR_EACH(children, link) { + menuitem = (JWidget)link->data; + + if (jwidget_get_type(menuitem) == JI_MENUITEM) { + if (menuitem_get_command(menuitem) == command) { + jmenuitem_set_accel(menuitem, command->accel); + } + + submenu = jmenuitem_get_submenu(menuitem); + if (submenu) { + apply_shortcut_to_menuitems_with_command(submenu, command); + } + } + } + + jlist_free(children); +} diff --git a/src/modules/rootmenu.h b/src/modules/rootmenu.h index df8912842..1bf490835 100644 --- a/src/modules/rootmenu.h +++ b/src/modules/rootmenu.h @@ -42,6 +42,6 @@ JWidget get_layer_popup_menuitem(void); JWidget get_frame_popup_menuitem(void); int check_for_accel(int accel_type, JMessage msg); -void show_filters_popup_menu(void); +void show_fx_popup_menu(void); #endif /* MODULES_ROOTMENU_H */ diff --git a/src/modules/sprites.c b/src/modules/sprites.c index 1701b6ce3..03f17d764 100644 --- a/src/modules/sprites.c +++ b/src/modules/sprites.c @@ -57,7 +57,7 @@ int init_module_sprites(void) return 0; } -void exit_module_sprites (void) +void exit_module_sprites(void) { if (clipboard_sprite) { sprite_free(clipboard_sprite); diff --git a/src/script/export.h b/src/script/export.h index f2296d074..5dec01b44 100644 --- a/src/script/export.h +++ b/src/script/export.h @@ -107,7 +107,7 @@ void intl_set_lang(const char *lang); /* modules/rootmenu.c */ -void show_filters_popup_menu(void); +void show_fx_popup_menu(void); /* modules/tools.c */ @@ -309,7 +309,6 @@ int set_gfx(const char *card, int w, int h, int depth); /* dialogs/... */ -void dialogs_about(void); void dialogs_color_curve(void); void dialogs_convolution_matrix(void); void dialogs_draw_text(void); @@ -858,7 +857,7 @@ void jentry_deselect_text(JWidget entry); /* Image ************************************************************/ -/* JWidget ji_image_new(struct BITMAP *bmp, int align); */ +/* JWidget jimage_new(struct BITMAP *bmp, int align); */ /* Label ************************************************************/ @@ -942,10 +941,10 @@ void jmessage_set_sub_msg(JMessage msg, JMessage sub_msg); /* Panel ************************************************************/ -JWidget ji_panel_new(int align); +JWidget jpanel_new(int align); -double ji_panel_get_pos(JWidget panel); -void ji_panel_set_pos(JWidget panel, double pos); +double jpanel_get_pos(JWidget panel); +void jpanel_set_pos(JWidget panel, double pos); /* QuickMenu ********************************************************/ diff --git a/src/script/genbinds.c b/src/script/genbinds.c index ef54a70b3..693cc2e99 100644 --- a/src/script/genbinds.c +++ b/src/script/genbinds.c @@ -555,9 +555,9 @@ static int bind_intl_set_lang(lua_State *L) return 0; } -static int bind_show_filters_popup_menu(lua_State *L) +static int bind_show_fx_popup_menu(lua_State *L) { - show_filters_popup_menu(); + show_fx_popup_menu(); return 0; } @@ -4251,33 +4251,33 @@ static int bind_jmessage_set_sub_msg(lua_State *L) return 0; } -static int bind_ji_panel_new(lua_State *L) +static int bind_jpanel_new(lua_State *L) { JWidget return_value; int align; GetArg(1, align, int, number); - return_value = ji_panel_new(align); + return_value = jpanel_new(align); push_userdata(L, Type_JWidget, return_value); return 1; } -static int bind_ji_panel_get_pos(lua_State *L) +static int bind_jpanel_get_pos(lua_State *L) { double return_value; JWidget panel; GetUD(1, panel, JWidget); - return_value = ji_panel_get_pos(panel); + return_value = jpanel_get_pos(panel); lua_pushnumber(L, return_value); return 1; } -static int bind_ji_panel_set_pos(lua_State *L) +static int bind_jpanel_set_pos(lua_State *L) { JWidget panel; double pos; GetUD(1, panel, JWidget); GetArg(2, pos, double, number); - ji_panel_set_pos(panel, pos); + jpanel_set_pos(panel, pos); return 0; } @@ -5767,7 +5767,7 @@ const luaL_reg bindings_routines[] = { { "intl_load_lang", bind_intl_load_lang }, { "intl_get_lang", bind_intl_get_lang }, { "intl_set_lang", bind_intl_set_lang }, - { "show_filters_popup_menu", bind_show_filters_popup_menu }, + { "show_fx_popup_menu", bind_show_fx_popup_menu }, { "select_tool", bind_select_tool }, { "get_brush_type", bind_get_brush_type }, { "get_brush_size", bind_get_brush_size }, @@ -6151,9 +6151,9 @@ const luaL_reg bindings_routines[] = { { "jmessage_broadcast_to_children", bind_jmessage_broadcast_to_children }, { "jmessage_broadcast_to_parents", bind_jmessage_broadcast_to_parents }, { "jmessage_set_sub_msg", bind_jmessage_set_sub_msg }, - { "ji_panel_new", bind_ji_panel_new }, - { "ji_panel_get_pos", bind_ji_panel_get_pos }, - { "ji_panel_set_pos", bind_ji_panel_set_pos }, + { "jpanel_new", bind_jpanel_new }, + { "jpanel_get_pos", bind_jpanel_get_pos }, + { "jpanel_set_pos", bind_jpanel_set_pos }, { "jradio_new", bind_jradio_new }, { "jradio_get_group", bind_jradio_get_group }, { "jradio_deselect_group", bind_jradio_deselect_group }, diff --git a/src/widgets/menu.c b/src/widgets/menuitem.c similarity index 100% rename from src/widgets/menu.c rename to src/widgets/menuitem.c diff --git a/src/widgets/menu.h b/src/widgets/menuitem.h similarity index 92% rename from src/widgets/menu.h rename to src/widgets/menuitem.h index fc917f696..a0d1596aa 100644 --- a/src/widgets/menu.h +++ b/src/widgets/menuitem.h @@ -16,8 +16,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef WIDGETS_MENU_H -#define WIDGETS_MENU_H +#ifndef WIDGETS_MENUITEM_H +#define WIDGETS_MENUITEM_H #include "jinete/base.h" @@ -29,4 +29,4 @@ JWidget menuitem_new(const char *text, Command *menuitem_get_command(JWidget menuitem); -#endif /* WIDGETS_MENU_H */ +#endif /* WIDGETS_MENUITEM_H */