Added all the "Command" stuff.

This commit is contained in:
David Capello 2007-09-23 20:13:58 +00:00
parent 447451e374
commit 8d94d16c0b
212 changed files with 7397 additions and 1382 deletions

View File

@ -1,3 +1,21 @@
2007-09-23 David A. Capello <dacap@users.sourceforge.net>
* 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 <dacap@users.sourceforge.net>
* 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 <dacap@users.sourceforge.net>
* jinete/src/jxml.c: Added routines to load XML files.
2007-09-19 David A. Capello <dacap@users.sourceforge.net> 2007-09-19 David A. Capello <dacap@users.sourceforge.net>
* src/modules/gui.c (display_switch_in_callback): Fixed (now it * src/modules/gui.c (display_switch_in_callback): Fixed (now it

View File

@ -3,7 +3,8 @@ LEGAL ISSUES
=================================== ===================================
- ASE is distributed under GPL license. - 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. - ALFONT is under LGPL terms.
- quantize.c is copyright by Ben Davis (you need his authorization to - quantize.c is copyright by Ben Davis (you need his authorization to
use his code in your own program). use his code in your own program).
@ -15,5 +16,9 @@ LEGAL ISSUES
- Libart 2.3.3 is distributed under LGPL license. - Libart 2.3.3 is distributed under LGPL license.
- Libintl is distributed under LGPL license. - Libintl is distributed under LGPL license.
- The FreeType Project is distributed under FTL 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

279
NEWS.txt
View File

@ -5,172 +5,179 @@ NEWS
0.6 0.6
--- ---
- Added support for PNG files (through libpng). + New XML format for the menus. Restructured all the menus (more user
- Finally screen scaling supported (with double-buffering). This means 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 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. (screen-scaling x2). This is the new default video mode for ASE.
- Fixed compilations errors for 4.x + Fixed compilations errors for 4.x
- Fixed menus.es + Fixed menus.es
0.5 0.5
--- ---
- Added features-requested by Carl Olsson: + Added features-requested by Carl Olsson:
+ better "snap to grid" support for box-like tools (rectangle, + better "snap to grid" support for box-like tools (rectangle,
ellipse, etc.). ellipse, etc.).
+ floating selection now "snap to grid" also. + floating selection now "snap to grid" also.
+ added a subpixel movement for zoomed-cursors in the editor, to + added a subpixel movement for zoomed-cursors in the editor, to
known where we are inside the pixel. 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). sprite-editor (to scroll and zoom).
- GIF support to save file fully supported by default. + GIF support to save file fully supported by default.
- Fixed compilation with Allegro 4.2.3 SVN (and fixed a bug in Allegro + Fixed compilation with Allegro 4.2.3 SVN (and fixed a bug in Allegro
with key_shifts). 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). to Manuel De Miguel Moreno to report it).
0.4 0.4
--- ---
- Removed the console mode. - Removed the console mode.
- Changed Film Editor shortcut: TAB key. + Changed Film Editor shortcut: TAB key.
- New feature: Each animation frame has duration. + New feature: Each animation frame has duration.
- New Palette Editor (F4 key). + New Palette Editor (F4 key).
- Now sprites support multiple palettes: Each frame can has its own + Now sprites support multiple palettes: Each frame can has its own
color palette. color palette.
- Added support to load GIF files (by Elias Pschernig). + Added support to load GIF files (by Elias Pschernig).
- Added a combobox to file-selection to handle the bookmarks. + Added a combobox to file-selection to handle the bookmarks.
- Added rotation!!! Now you can scale and rotate what you paste from + Added rotation!!! Now you can scale and rotate what you paste from
the clipboard. the clipboard.
0.3.1 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. happens in Windows.
- Added es.po and tips.es files. + Added es.po and tips.es files.
0.3 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). automatically).
- Added a tool to draw text (finally). + Added a tool to draw text (finally).
- More documentation and tips. + More documentation and tips.
- Improved the frame adding process. + Improved the frame adding process.
- Fixed important bugs. + Fixed important bugs.
- Added a mapgen utility (original code by Johan Halmén and Anders + Added a mapgen utility (original code by Johan Halmén and Anders
Andersson). Andersson).
- Spanish language support (now works in Windows too). + Spanish language support (now works in Windows too).
- Internal code improved (mainly GUI parts, and functions names). + Internal code improved (mainly GUI parts, and functions names).
0.2.4 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. redo-after-overwrite-undo feature.
- New median filter to despeckle images. + New median filter to despeckle images.
- Updated alternative support to load/save JPEG files with JPGalleg 2.3 + Updated alternative support to load/save JPEG files with JPGalleg 2.3
library, thanks to Angelo Mottola for this. 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: shortcuts. Some combinations changes:
+ <~> to <`> (open film editor) + <~> to <`> (open film editor)
+ <Ctrl+/> to <?> (mask by color) + <Ctrl+/> to <?> (mask by color)
+ <Ctrl+~> to <Ctrl+4> (close current editor) + <Ctrl+~> to <Ctrl+4> (close current editor)
- Added Cut, Copy, Paste! + Added Cut, Copy, Paste!
- Added AutoCrop (before known as Trim). + Added AutoCrop (before known as Trim).
0.2.3 0.2.3
----- -----
- Fixed routine to save JPG files. + Fixed routine to save JPG files.
- Fixed and improved various parts of GUI. + Fixed and improved various parts of GUI.
0.2.2 0.2.2
----- -----
- Added some documentation to write Lua scripts. + Added some documentation to write Lua scripts.
- Film Editor was improved. + Film Editor was improved.
- Fixed errors with the graphics cursor, some keyboard problems, and + Fixed errors with the graphics cursor, some keyboard problems, and
various minor bugs. 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. beginners.
- Onionskin feature is done. + Onionskin feature is done.
- Added (optional) ordered dithering to render RGB images in 8 bpp. + Added (optional) ordered dithering to render RGB images in 8 bpp.
- New actions: Merge Down, New Frame, Copy Frame, change Image Type!, + New actions: Merge Down, New Frame, Copy Frame, change Image Type!,
Load Script File. Load Script File.
- Optimized the drawing speed with tiled mode. + Optimized the drawing speed with tiled mode.
0.2.1 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. 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). but I have planned make this usable in Windows).
- More undo support: insert/remove layers and mask modifications. + More undo support: insert/remove layers and mask modifications.
- Filters Convolution Matrix and Color Curve are back. + Filters Convolution Matrix and Color Curve are back.
- Added more basic operations (with undo support): flatten layers, + Added more basic operations (with undo support): flatten layers,
duplicate layer, duplicate sprite, horizontal/vertical flip, crop duplicate layer, duplicate sprite, horizontal/vertical flip, crop
frame. frame.
- New .ASE format (in alpha status, please test it!). + New .ASE format (in alpha status, please test it!).
- Easy script routines: now are a high-level layer of routines (easy + Easy script routines: now are a high-level layer of routines (easy
to use and understand), and the low-level routine's set (for to use and understand), and the low-level routine's set (for
internal or more specific works). internal or more specific works).
- Removed all the interpolation stuff between key-frames: yes, after - Removed all the interpolation stuff between key-frames: yes, after
thinking, this make too hard the animation edition (so the "fancy thinking, this make too hard the animation edition (so the "fancy
spline interpolation" was removed). spline interpolation" was removed).
- Optimized the editor's speed in scroll movements. + Optimized the editor's speed in scroll movements.
- The Film Editor is almost done for layers and frames handle. + The Film Editor is almost done for layers and frames handle.
- Fixed filters using mask with displaced layers. + Fixed filters using mask with displaced layers.
- Support to apply filters to various frames/layers at the same time. + 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 + Added differents screen layouts in main.jid (see FAQ.txt to see how
change between them). change between them).
- The tool bar is back! + The tool bar is back!
0.2 0.2
--- ---
- Fixed a lot of bugs. + Fixed a lot of bugs.
- Added optional support for JPEG with JPGalleg 2.0 library. + Added optional support for JPEG with JPGalleg 2.0 library.
- Added draw mode: Opaque (normal), Glass (transparent), Semi + Added draw mode: Opaque (normal), Glass (transparent), Semi
(pattern). (pattern).
- Added brush types: Circle, Square, Line. + Added brush types: Circle, Square, Line.
- Implemented a fake-palette system to make the GUI usable with any + Implemented a fake-palette system to make the GUI usable with any
sprite palette (mainly to avoid "black-screen" situations when open sprite palette (mainly to avoid "black-screen" situations when open
sprites with ugly palettes). 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). 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 (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 more help. Anyway, I try to leave the compability in the more used
commands. 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 from same scripts, to give you an idea, various of menus actions are
programmed directly with scripts. 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 areas (add, subtract, intersect, by color), save and load them in
the .MSK Animator Pro format. 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). 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 reprogrammed. The more big change, was to property/keyframe level
(the properties can be with lineal or spline interpolation, also, (the properties can be with lineal or spline interpolation, also,
have a ending flag to make circular movements or patterns of movement). 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). completelly, I made a new GUI library: Jinete (rider).
0.1.2 0.1.2
----- -----
- New RLE Gaussian Blur effect (from The GIMP source code). + New RLE Gaussian Blur effect (from The GIMP source code).
- Blender modes are back!: Normal, Multiply, Screen, Overlay, + Blender modes are back!: Normal, Multiply, Screen, Overlay,
Hard Light, Darken, Lighten, Addition, Subtract, Difference, Hue, Hard Light, Darken, Lighten, Addition, Subtract, Difference, Hue,
Saturation, Color, Luminosity. Saturation, Color, Luminosity.
- Better the GUI look: With colors, this should be less boring :-) + Better the GUI look: With colors, this should be less boring :-)
- Added a graphics selection dialog where you can specify any + Added a graphics selection dialog where you can specify any
resolution (this could be useful for windowed modes). 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 :-) 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 - 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 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 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 script-string to call the new plug-in action. Also, this save me a
lot of headaches :-) 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. every layer, to every animation frame, or both.
- Added the "Recent Files" list. + Added the "Recent Files" list.
- A complete set of scripts routines to handle paths. + A complete set of scripts routines to handle paths.
- New selection type: "shrink", to shrink the selection to the current + New selection type: "shrink", to shrink the selection to the current
layer bitmap bounds. layer bitmap bounds.
- New "trim_sprite" action. + New "trim_sprite" action.
0.1.0 0.1.0
----- -----
- Removed the `move' tool to displace layers (it was redundant). - Removed the `move' tool to displace layers (it was redundant).
- New interface to load Plug-Ins in a dynamic way (DLL, .so). + New interface to load Plug-Ins in a dynamic way (DLL, .so).
- Complete new support for JPEG files (RGB/grayscale) load/save: + Complete new support for JPEG files (RGB/grayscale) load/save:
athwart the Independent JPEG Group's JPEG Library. athwart the Independent JPEG Group's JPEG Library.
- New actions: + New actions:
+ trim_layer_bitmap: trim the current layer to the selection bounds. + trim_layer_bitmap: trim the current layer to the selection bounds.
+ merge_down: to merge the current layer with the next one. + merge_down: to merge the current layer with the next one.
+ make_undo_animation: to make an animation from the undo + make_undo_animation: to make an animation from the undo
operations (to see all the progression of the graphics). operations (to see all the progression of the graphics).
+ undo_history: to undo/redo various operations. + undo_history: to undo/redo various operations.
+ color_curve: to make color conversion effects pixel by pixel. + color_curve: to make color conversion effects pixel by pixel.
- Improved the `Color Replace' command (with `tolerance' and `preview'). + Improved the `Color Replace' command (with `tolerance' and `preview').
- A new optimized layer-bar, to handle all the keyframe/properties stuff. + A new optimized layer-bar, to handle all the keyframe/properties stuff.
- Various things rewritten to Plug-Ins: + Various things rewritten to Plug-Ins:
+ file formats, + file formats,
+ actions for menus (also, now these actions can be used from scripts). + 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. 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. 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 0.0.7
----- -----
- New scripts routines: request(), apply_filter(), load_sprite(), + New scripts routines: request(), apply_filter(), load_sprite(),
and save_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. 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. ani01.pcx, ani02.pcx, etc.
- More undo functionality. I re-wrote the entire `undo' system. + More undo functionality. I re-wrote the entire `undo' system.
- New rectangular-selection tool: Now you can cut, copy, paste and clear. + New rectangular-selection tool: Now you can cut, copy, paste and clear.
- New RLE compression for 8 bpp in .ase files. + 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)': + 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. 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 with this you can make animations of objects moving only the keyframes
(all the intermediate frames will be calculate automatically). (all the intermediate frames will be calculate automatically).
- Now the program remember the configuration (through `ase.cfg'). + Now the program remember the configuration (through `ase.cfg').
- Added a new draw-tiled mode. + Added a new draw-tiled mode.
- New full-screen editing mode. With resizable layer-bar. + New full-screen editing mode. With resizable layer-bar.
- Added an options to draw the previous frame in transparent mode. + Added an options to draw the previous frame in transparent mode.
- Removed the `background' properties of layers: from now, a layer - Removed the `background' properties of layers: from now, a layer
will be transparent (masked-blitting) ever. With this are fixed will be transparent (masked-blitting) ever. With this are fixed
a lot of problems with load/save routines in old versions. a lot of problems with load/save routines in old versions.
- New `reload_menus' command. + New `reload_menus' command.
0.0.6 0.0.6
----- -----
- I still don't recommend you the .ase format (just for temporary usage): - I still don't recommend you the .ase format (just for temporary usage):
there are planes to change it. 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 now, you can make automatic tasks programming your own scripts
(included some scripts as example). (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). 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 Now add/remove/move/copy layer and frames are really-very-easy
with the new layer-panel (like in Macromedia Flash). with the new layer-panel (like in Macromedia Flash).
- More easy tool-configuration. + More easy tool-configuration.
- New drawing tool: real-pencil, with a unique and original algorithm. + New drawing tool: real-pencil, with a unique and original algorithm.
- Removed all the use of the Allegro GUI. - 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. now, the colors are in harmony for the eyes.
0.0.5 0.0.5
----- -----
- More facilities to handle colors with different `alpha'. + More facilities to handle colors with different `alpha'.
- New animation control: need test (see `bugs.txt' to report errors). + New animation control: need test (see `bugs.txt' to report errors).
- Optimized the color-selection dialog: now you can make gammas + Optimized the color-selection dialog: now you can make gammas
between *four* colors. between *four* colors.
- Added a `preview' in the apply-filter dialog. + Added a `preview' in the apply-filter dialog.
- New improved gui system (for the users and for the developers). + New improved gui system (for the users and for the developers).
- New `tile' and `reload' option for the filters. + New `tile' and `reload' option for the filters.
- New view-tile option in tool-menu (for make tileable patterns). + New view-tile option in tool-menu (for make tileable patterns).
0.0.4 0.0.4
----- -----
- Modificable draw properties: + Modificable draw properties:
thickness, alpha color, spray random factor, and spray radius. thickness, alpha color, spray random factor, and spray radius.
- Undo support for all tools. + Undo support for all tools.
- Multiple drawing tools support: + Multiple drawing tools support:
pixel, pencil, fill, spray, line, rectangle, and ellipse; pixel, pencil, fill, spray, line, rectangle, and ellipse;
- New improved layer control. + New improved layer control.
- A lot of optimizations in the status bar. + A lot of optimizations in the status bar.
- New duplicate sprite option. + New duplicate sprite option.
- New session manager, for load and save your work. Other utility of this, + 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. 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: - 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. I recommend you don't save in .ase until the 0.1 release.
- New "visible" property for hide and show the layers. + New "visible" property for hide and show the layers.
- New change color-depth function. + New change color-depth function.
- Added a set-gfx-mode option in the system-menu. + Added a set-gfx-mode option in the system-menu.
- New duplicate layer support. + New duplicate layer support.
0.0.3 0.0.3
----- -----
- New .ase format (for save the layers). + New .ase format (for save the layers).
- More keyboard shorcuts (with a new `keys.txt'). + More keyboard shorcuts (with a new `keys.txt').
- New layers operations: insert, move and remove. + New layers operations: insert, move and remove.
- RGBA (alpha channel) bitmaps support. + RGBA (alpha channel) bitmaps support.
- New filter capability, with some examples of filters. + New filter capability, with some examples of filters.
- An incredible new way to create dialogs (for programmers only). + An incredible new way to create dialogs (for programmers only).
- More "Windows friendly" text files. + More "Windows friendly" text files.
- New optimized status bar. + New optimized status bar.
- New improved look of the GUI. + New improved look of the GUI.
0.0.2 0.0.2
----- -----
- New "infinite" Undo & Redo support. + New "infinite" Undo & Redo support.
- Some importants bug fixed. + Some importants bug fixed.
0.0.1 0.0.1
----- -----
- One tool: interactive line. + One tool: interactive line.
- Color selection support. + Color selection support.
- Poor palette modification capability. - Poor palette modification capability.

View File

@ -25,6 +25,7 @@ High priority work
- quick swap; - quick swap;
+ the regions mustn't be overlapped; + the regions mustn't be overlapped;
- options to change the curve type (in curedit.c); - options to change the curve type (in curedit.c);
- sprite resize;
- canvas size; - canvas size;
+ with the current crop this isn't necessary anymore; + with the current crop this isn't necessary anymore;
+ anyway, it's a good way to expand the graphics + anyway, it's a good way to expand the graphics

View File

@ -266,7 +266,7 @@ F&rame FRAME_POPUP {
"Fi&lm Editor" FILMEDITOR_ACCEL = has_sprite "switch_between_film_and_sprite_editor()" <Tab> ; "Fi&lm Editor" FILMEDITOR_ACCEL = has_sprite "switch_between_film_and_sprite_editor()" <Tab> ;
"&Palette Editor" = always "dialogs_palette_editor()" <F4> ; "&Palette Editor" = always "dialogs_palette_editor()" <F4> ;
---- ----
"F&ilters Popup Menu" = always "show_filters_popup_menu()" <X> ; "F&ilters Popup Menu" = always "show_fx_popup_menu()" <X> ;
} }
L&ist SPRITE_LIST ; L&ist SPRITE_LIST ;

View File

@ -183,7 +183,7 @@ F&rame FRAME_POPUP {
"E&ditor de Película" FILMEDITOR_ACCEL = has_sprite "switch_between_film_and_sprite_editor()" <Tab> ; "E&ditor de Película" FILMEDITOR_ACCEL = has_sprite "switch_between_film_and_sprite_editor()" <Tab> ;
"&Paleta de Colores" = always "dialogs_palette_editor()" <F4> ; "&Paleta de Colores" = always "dialogs_palette_editor()" <F4> ;
---- ----
"Popup Menu de &Filtros" = always "show_filters_popup_menu()" <X> ; "Popup Menu de &Filtros" = always "show_fx_popup_menu()" <X> ;
} }
L&ista SPRITE_LIST ; L&ista SPRITE_LIST ;

View File

@ -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<<There are sprites with changes.<<Do you want quit anyway?||&Yes||&No"))
!= 1 then
return
end
break
end
sprite = get_next_sprite(sprite)
end
-- close the window
jwindow_close(app_get_top_window(), 0)
end

View File

@ -1,5 +1,5 @@
/* jinete - a GUI library /* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * Copyright (C) 2003-2005, 2007 by David A. Capello
* *
* Jinete is gift-ware. * Jinete is gift-ware.
*/ */
@ -8,55 +8,57 @@
#include "jinete.h" #include "jinete.h"
int main (int argc, char *argv[]) int main(int argc, char *argv[])
{ {
/* widgets to use */ /* widgets to use */
JWidget manager, window, box, label, button; JWidget manager, window, box, label, button;
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer();
install_keyboard (); install_keyboard();
install_mouse (); install_mouse();
/* Jinete initialization */ /* Jinete initialization */
manager = jmanager_new (); manager = jmanager_new();
ji_set_standard_theme (); ji_set_standard_theme();
/* create main window */ /* create main window */
window = jwindow_new ("Example 00"); window = jwindow_new("Example 00");
/* create a vertical box to set label and button positions */ /* create a vertical box to set label and button positions */
box = jbox_new (JI_VERTICAL); box = jbox_new(JI_VERTICAL);
/* create a simple centered label with "Hello World!" text */ /* create a simple centered label with "Hello World!" text */
label = jlabel_new ("Hello World!"); label = jlabel_new("Hello World!");
jwidget_set_align (label, JI_CENTER | JI_MIDDLE); jwidget_set_align(label, JI_CENTER | JI_MIDDLE);
/* create a button to close the window */ /* create a button to close the window */
button = jbutton_new ("&Close"); button = jbutton_new("&Close");
/* a expansive widget can get more space that other ones */ /* a expansive widget can get more space that other ones */
jwidget_expansive (label, TRUE); jwidget_expansive(label, TRUE);
/* put the label and button in the box and that box in the window */ /* put the label and button in the box and that box in the window */
jwidget_add_child (box, label); jwidget_add_child(box, label);
jwidget_add_child (box, button); jwidget_add_child(box, button);
jwidget_add_child (window, box); jwidget_add_child(window, box);
/* show the window in the screen and leave it in the background (the /* show the window in the screen and leave it in the background (the
manager will free it) */ manager will free it) */
jwindow_open_bg (window); jwindow_open_bg(window);
/* run windows */ /* run windows */
jmanager_run (manager); jmanager_run(manager);
/* Jinete finalization */ /* Jinete finalization */
jmanager_free (manager); jmanager_free(manager);
return 0; return 0;
} }

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -14,9 +39,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -14,9 +39,11 @@ int main (int argc, char *argv[])
JWidget manager, window, box, label1, label2, label3, label4; JWidget manager, window, box, label1, label2, label3, label4;
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,62 +1,89 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
#include "jinete.h" #include "jinete.h"
int main (int argc, char *argv[]) int main(int argc, char *argv[])
{ {
JWidget manager, window, box; JWidget manager, window, box;
JWidget slider1, slider2, slider3, slider4, slider5, button1; JWidget slider1, slider2, slider3, slider4, slider5, button1;
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer();
install_keyboard (); install_keyboard();
install_mouse (); install_mouse();
/* Jinete initialization */ /* Jinete initialization */
manager = jmanager_new (); manager = jmanager_new();
ji_set_standard_theme (); ji_set_standard_theme();
window = jwindow_new ("Example 03"); window = jwindow_new("Example 03");
box = jbox_new (JI_VERTICAL); box = jbox_new(JI_VERTICAL);
slider1 = jslider_new (0, 1, 0); slider1 = jslider_new(0, 1, 0);
slider2 = jslider_new (0, 2, 0); slider2 = jslider_new(0, 2, 0);
slider3 = jslider_new (0, 10, 0); slider3 = jslider_new(0, 10, 0);
slider4 = jslider_new (0, 63, 1); slider4 = jslider_new(0, 63, 1);
slider5 = jslider_new (0, 255, 1); slider5 = jslider_new(0, 255, 1);
button1 = jbutton_new ("&Close"); button1 = jbutton_new("&Close");
jwidget_set_static_size (slider1, 128, 0); jwidget_set_static_size(slider1, 128, 0);
jwidget_set_static_size (slider2, 128, 0); jwidget_set_static_size(slider2, 128, 0);
jwidget_set_static_size (slider3, 128, 0); jwidget_set_static_size(slider3, 128, 0);
jwidget_set_static_size (slider4, 128, 0); jwidget_set_static_size(slider4, 128, 0);
jwidget_set_static_size (slider5, 128, 0); jwidget_set_static_size(slider5, 128, 0);
jwidget_expansive (slider1, TRUE); jwidget_expansive(slider1, TRUE);
jwidget_expansive (slider2, TRUE); jwidget_expansive(slider2, TRUE);
jwidget_expansive (slider3, TRUE); jwidget_expansive(slider3, TRUE);
jwidget_expansive (slider4, TRUE); jwidget_expansive(slider4, TRUE);
jwidget_expansive (slider5, TRUE); jwidget_expansive(slider5, TRUE);
jwidget_add_child (window, box); jwidget_add_child(window, box);
jwidget_add_childs (box, jwidget_add_childs(box,
slider1, slider2, slider3, slider1, slider2, slider3,
slider4, slider5, button1, NULL); slider4, slider5, button1, NULL);
jwindow_open_bg (window); jwindow_open_bg(window);
jmanager_run (manager); jmanager_run(manager);
jmanager_free (manager); jmanager_free(manager);
return 0; return 0;
} }

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -14,23 +39,25 @@ int main (int argc, char *argv[])
int ret; int ret;
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer();
install_keyboard (); install_keyboard();
install_mouse (); install_mouse();
/* Jinete initialization */ /* Jinete initialization */
manager = jmanager_new (); manager = jmanager_new();
ji_set_standard_theme (); ji_set_standard_theme();
jmanager_refresh_screen (); jmanager_refresh_screen();
ji_mouse_set_cursor (JI_CURSOR_NORMAL); ji_mouse_set_cursor(JI_CURSOR_NORMAL);
jalert ("Normal==First Alert||&Ok"); jalert("Normal==First Alert||&Ok");
jalert ("Error" jalert ("Error"
"==This is a long text line" "==This is a long text line"
"--" "--"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -16,9 +41,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -16,9 +41,11 @@ int main (int argc, char *argv[])
allegro_init (); allegro_init ();
set_color_depth (8); set_color_depth (8);
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -12,24 +37,26 @@ int main (int argc, char *argv[])
{ {
JWidget manager, window, box1, box2, view1, view2, button; JWidget manager, window, box1, box2, view1, view2, button;
allegro_init (); allegro_init();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer();
install_keyboard (); install_keyboard();
install_mouse (); install_mouse();
manager = jmanager_new (); manager = jmanager_new();
ji_set_standard_theme (); ji_set_standard_theme();
window = jwindow_new ("Example 07"); window = jwindow_new("Example 07");
box1 = jbox_new (JI_VERTICAL); box1 = jbox_new(JI_VERTICAL);
box2 = ji_panel_new (JI_HORIZONTAL); box2 = jpanel_new(JI_HORIZONTAL);
view1 = jview_new (); view1 = jview_new();
view2 = jview_new (); view2 = jview_new();
button = jbutton_new ("&Close"); button = jbutton_new("&Close");
jwidget_expansive (view1, TRUE); jwidget_expansive (view1, TRUE);
jwidget_expansive (view2, TRUE); jwidget_expansive (view2, TRUE);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -69,9 +94,11 @@ int main (int argc, char *argv[])
JWidget manager; JWidget manager;
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -19,9 +44,11 @@ int main(int argc, char *argv[])
JRect pos; JRect pos;
allegro_init(); allegro_init();
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer(); install_timer();
install_keyboard(); install_keyboard();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -25,9 +50,11 @@ int main (int argc, char *argv[])
int c; int c;
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -16,9 +41,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_SAFE, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -38,9 +63,11 @@ int main (int argc, char *argv[])
JWidget manager, window, box, button, menubar; JWidget manager, window, box, button, menubar;
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -9,10 +34,10 @@
#include "jinete.h" #include "jinete.h"
static JWidget new_menuitem (const char *text, const char *accel_string); static JWidget new_menuitem(const char *text, const char *accel_string);
static bool hooked_menuitem_msg_proc (JWidget widget, JMessage msg); 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 manager, window, box1, button;
JWidget menu; JWidget menu;
@ -38,103 +63,105 @@ int main (int argc, char *argv[])
JWidget menuitem_edit_paste; JWidget menuitem_edit_paste;
JWidget menuitem_edit_clear; JWidget menuitem_edit_clear;
allegro_init (); allegro_init();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer();
install_keyboard (); install_keyboard();
install_mouse (); install_mouse();
manager = jmanager_new (); manager = jmanager_new();
ji_set_standard_theme (); ji_set_standard_theme();
window = jwindow_new ("Menus"); window = jwindow_new("Menus");
box1 = jbox_new (JI_VERTICAL); box1 = jbox_new(JI_VERTICAL);
button = jbutton_new ("&Close"); button = jbutton_new("&Close");
menu = jmenu_new (); menu = jmenu_new();
menubar = jmenubar_new (); menubar = jmenubar_new();
menuitem_file = jmenuitem_new ("&File"); menuitem_file = jmenuitem_new("&File");
menuitem_edit = jmenuitem_new ("&Edit"); menuitem_edit = jmenuitem_new("&Edit");
menuitem_tool = new_menuitem ("&Tools", NULL); menuitem_tool = new_menuitem("&Tools", NULL);
menuitem_help = new_menuitem ("&Help", NULL); menuitem_help = new_menuitem("&Help", NULL);
menu_file = jmenu_new (); menu_file = jmenu_new();
menuitem_file_new = jmenuitem_new ("&New"); menuitem_file_new = jmenuitem_new("&New");
menuitem_file_open = new_menuitem ("&Open", "<Ctrl+O>"); menuitem_file_open = new_menuitem("&Open", "<Ctrl+O>");
menuitem_file_save = new_menuitem ("&Save", "<Ctrl+S>"); jwidget_disable (menuitem_file_save); menuitem_file_save = new_menuitem("&Save", "<Ctrl+S>"); jwidget_disable (menuitem_file_save);
menuitem_file_sep1 = ji_separator_new (NULL, JI_HORIZONTAL); menuitem_file_sep1 = ji_separator_new(NULL, JI_HORIZONTAL);
menuitem_file_quit = new_menuitem ("&Quit", "<Ctrl+Q>"); menuitem_file_quit = new_menuitem("&Quit", "<Ctrl+Q>");
menu_filenew = jmenu_new (); menu_filenew = jmenu_new();
menuitem_filenew_sprite = new_menuitem ("&Sprite", NULL); menuitem_filenew_sprite = new_menuitem("&Sprite", NULL);
menuitem_filenew_image = new_menuitem ("&Image", NULL); menuitem_filenew_image = new_menuitem("&Image", NULL);
menuitem_filenew_font = new_menuitem ("&Font", NULL); menuitem_filenew_font = new_menuitem("&Font", NULL);
menuitem_filenew_palette = new_menuitem ("&Palette", NULL); menuitem_filenew_palette = new_menuitem("&Palette", NULL);
menu_edit = jmenu_new (); menu_edit = jmenu_new ();
menuitem_edit_cut = new_menuitem ("Cu&t", "<Shift+Del>"); menuitem_edit_cut = new_menuitem("Cu&t", "<Shift+Del>");
menuitem_edit_copy = new_menuitem ("&Copy", "<Ctrl+Ins>"); menuitem_edit_copy = new_menuitem("&Copy", "<Ctrl+Ins>");
menuitem_edit_paste = new_menuitem ("&Paste", "<Shift+Ins>"); menuitem_edit_paste = new_menuitem("&Paste", "<Shift+Ins>");
menuitem_edit_clear = new_menuitem ("C&lear", "<Ctrl+Del>"); menuitem_edit_clear = new_menuitem("C&lear", "<Ctrl+Del>");
jwidget_add_child (menu_file, menuitem_file_new); jwidget_add_child(menu_file, menuitem_file_new);
jwidget_add_child (menu_file, menuitem_file_open); jwidget_add_child(menu_file, menuitem_file_open);
jwidget_add_child (menu_file, menuitem_file_save); jwidget_add_child(menu_file, menuitem_file_save);
jwidget_add_child (menu_file, menuitem_file_sep1); jwidget_add_child(menu_file, menuitem_file_sep1);
jwidget_add_child (menu_file, menuitem_file_quit); jwidget_add_child(menu_file, menuitem_file_quit);
jmenuitem_set_submenu (menuitem_file, menu_file); jmenuitem_set_submenu(menuitem_file, menu_file);
jwidget_add_child (menu_filenew, menuitem_filenew_sprite); jwidget_add_child(menu_filenew, menuitem_filenew_sprite);
jwidget_add_child (menu_filenew, menuitem_filenew_image); jwidget_add_child(menu_filenew, menuitem_filenew_image);
jwidget_add_child (menu_filenew, menuitem_filenew_font); jwidget_add_child(menu_filenew, menuitem_filenew_font);
jwidget_add_child (menu_filenew, menuitem_filenew_palette); jwidget_add_child(menu_filenew, menuitem_filenew_palette);
jmenuitem_set_submenu (menuitem_file_new, menu_filenew); jmenuitem_set_submenu(menuitem_file_new, menu_filenew);
jwidget_add_child (menu_edit, menuitem_edit_cut); jwidget_add_child(menu_edit, menuitem_edit_cut);
jwidget_add_child (menu_edit, menuitem_edit_copy); jwidget_add_child(menu_edit, menuitem_edit_copy);
jwidget_add_child (menu_edit, menuitem_edit_paste); jwidget_add_child(menu_edit, menuitem_edit_paste);
jwidget_add_child (menu_edit, menuitem_edit_clear); jwidget_add_child(menu_edit, menuitem_edit_clear);
jmenuitem_set_submenu (menuitem_edit, menu_edit); jmenuitem_set_submenu(menuitem_edit, menu_edit);
jwidget_add_child (menu, menuitem_file); jwidget_add_child(menu, menuitem_file);
jwidget_add_child (menu, menuitem_edit); jwidget_add_child(menu, menuitem_edit);
jwidget_add_child (menu, menuitem_tool); jwidget_add_child(menu, menuitem_tool);
jwidget_add_child (menu, menuitem_help); jwidget_add_child(menu, menuitem_help);
jmenubar_set_menu (menubar, menu); jmenubar_set_menu(menubar, menu);
jwidget_add_child (box1, menubar); jwidget_add_child(box1, menubar);
jwidget_add_child (box1, button); jwidget_add_child(box1, button);
jwidget_add_child (window, box1); jwidget_add_child(window, box1);
jwindow_open_bg (window); jwindow_open_bg(window);
jmanager_run (manager); jmanager_run(manager);
jmanager_free (manager); jmanager_free(manager);
return 0; 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); JWidget menuitem = jmenuitem_new(text);
JAccel accel = jaccel_new (); JAccel accel = jaccel_new();
jwidget_add_hook (menuitem, JI_WIDGET, jwidget_add_hook(menuitem, JI_WIDGET,
hooked_menuitem_msg_proc, NULL); hooked_menuitem_msg_proc, NULL);
if (accel_string) 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; 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 && if (msg->type == JM_SIGNAL &&
msg->signal.num == JI_SIGNAL_MENUITEM_SELECT) msg->signal.num == JI_SIGNAL_MENUITEM_SELECT)
printf ("Selected item: %s\n", widget->text); printf("Selected item: %s\n", widget->text);
return FALSE; return FALSE;
} }

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -15,9 +40,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */ /* Allegro stuff */
allegro_init(); allegro_init();
if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer(); install_timer();
install_keyboard(); install_keyboard();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -25,9 +50,11 @@ int main (int argc, char *argv[])
JWidget manager, window1, box1, button1, button2, button3, button4, button5; JWidget manager, window1, box1, button1, button2, button3, button4, button5;
allegro_init(); allegro_init();
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer(); install_timer();
install_keyboard(); install_keyboard();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -19,9 +44,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -24,11 +49,15 @@ int main (int argc, char *argv[])
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init ();
set_color_depth (16); set_color_depth (16);
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
set_color_depth (8); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { set_color_depth (8);
allegro_message ("%s\n", allegro_error); if (set_gfx_mode (GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
return 1; if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
}
}
} }
} }
install_timer (); install_timer ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -16,9 +41,11 @@ int main (int argc, char *argv[])
JWidget manager, window, box, check1, check2, button1, button2; JWidget manager, window, box, check1, check2, button1, button2;
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();
@ -132,7 +159,7 @@ static JWidget tip_window_new(const char *text)
jwidget_set_align(window, JI_CENTER | JI_MIDDLE); jwidget_set_align(window, JI_CENTER | JI_MIDDLE);
/* remove decorative widgets */ /* 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_free(link->data);
jwidget_add_hook(window, JI_WIDGET, tip_window_hook, NULL); jwidget_add_hook(window, JI_WIDGET, tip_window_hook, NULL);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -28,9 +53,11 @@ int main(int argc, char *argv[])
{ {
/* Allegro stuff */ /* Allegro stuff */
allegro_init(); allegro_init();
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer(); install_timer();
install_keyboard(); install_keyboard();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -17,9 +42,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -16,57 +41,59 @@ int main (int argc, char *argv[])
/* Allegro stuff */ /* Allegro stuff */
allegro_init (); allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) { if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error); if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
return 1; allegro_message("%s\n", allegro_error);
return 1;
}
} }
install_timer (); install_timer ();
install_keyboard (); install_keyboard ();
install_mouse (); install_mouse ();
/* Jinete initialization */ /* Jinete initialization */
manager1 = jmanager_new (); manager1 = jmanager_new();
ji_set_standard_theme (); ji_set_standard_theme();
manager2 = jmanager_new (); manager2 = jmanager_new();
manager3 = jmanager_new (); manager3 = jmanager_new();
window1 = jwindow_new ("Window1"); window1 = jwindow_new("Window1");
window2 = jwindow_new ("Window2"); window2 = jwindow_new("Window2");
window3 = jwindow_new ("Window3"); window3 = jwindow_new("Window3");
view2 = jview_new (); view2 = jview_new();
view3 = jview_new (); view3 = jview_new();
jview_attach (view2, manager2); jview_attach(view2, manager2);
jview_attach (view3, manager3); jview_attach(view3, manager3);
jwidget_add_child (window1, view2); jwidget_add_child(window1, view2);
jwidget_add_child (window2, view3); jwidget_add_child(window2, view3);
jwindow_remap (window1); jwindow_remap(window1);
jwindow_remap (window2); jwindow_remap(window2);
jwindow_remap (window3); jwindow_remap(window3);
rect = jrect_new (JI_SCREEN_W/2-100, JI_SCREEN_H/2-70, rect = jrect_new(JI_SCREEN_W/2-100, JI_SCREEN_H/2-70,
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); jwidget_set_rect(window1, rect);
jrect_free (rect); jrect_free(rect);
rect = jrect_new (JI_SCREEN_W/2-90, JI_SCREEN_H/2-50, rect = jrect_new(JI_SCREEN_W/2-90, JI_SCREEN_H/2-50,
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); jwidget_set_rect(window2, rect);
jrect_free (rect); jrect_free(rect);
rect = jrect_new (JI_SCREEN_W/2-80, JI_SCREEN_H/2-30, rect = jrect_new(JI_SCREEN_W/2-80, JI_SCREEN_H/2-30,
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); jwidget_set_rect(window3, rect);
jrect_free (rect); jrect_free(rect);
jwindow_open_bg (window1); jwindow_open_bg(window1);
_jmanager_open_window(manager2, window2); _jmanager_open_window(manager2, window2);
_jmanager_open_window(manager3, window3); _jmanager_open_window(manager3, window3);
jmanager_run (manager1); jmanager_run(manager1);
jmanager_free (manager1); jmanager_free(manager1);
return 0; return 0;
} }

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_H
@ -34,11 +59,13 @@
#include "jinete/scroll.h" #include "jinete/scroll.h"
#include "jinete/sep.h" #include "jinete/sep.h"
#include "jinete/slider.h" #include "jinete/slider.h"
#include "jinete/stream.h"
#include "jinete/system.h" #include "jinete/system.h"
#include "jinete/textbox.h" #include "jinete/textbox.h"
#include "jinete/theme.h" #include "jinete/theme.h"
#include "jinete/view.h" #include "jinete/view.h"
#include "jinete/widget.h" #include "jinete/widget.h"
#include "jinete/window.h" #include "jinete/window.h"
#include "jinete/xml.h"
#endif /* JINETE_H */ #endif /* JINETE_H */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_ACCEL_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_ALERT_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 #ifndef JINETE_BASE_H
@ -207,10 +232,16 @@ typedef struct jquickmenu *JQuickMenu;
typedef struct jlink *JLink; typedef struct jlink *JLink;
typedef struct jlist *JList; typedef struct jlist *JList;
typedef union jmessage *JMessage; typedef union jmessage *JMessage;
typedef struct jstream *JStream;
typedef struct jrect *JRect; typedef struct jrect *JRect;
typedef struct jregion *JRegion; typedef struct jregion *JRegion;
typedef struct jtheme *JTheme; typedef struct jtheme *JTheme;
typedef struct jwidget *JWidget; 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 void (*JFunc) (void *data, void *user_data);
typedef int (*JCompareFunc) (const void *a, const void *b); 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); typedef void (*JDrawFunc) (JWidget widget);
/* memory routines */ /* memory routines */
void *jmalloc (unsigned long n_bytes); void *jmalloc (unsigned long n_bytes);
void *jmalloc0 (unsigned long n_bytes); void *jmalloc0(unsigned long n_bytes);
void *jrealloc (void *mem, unsigned long n_bytes); void *jrealloc(void *mem, unsigned long n_bytes);
void jfree (void *mem); void jfree (void *mem);
char *jstrdup (const char *string); char *jstrdup (const char *string);
#define jnew(struct_type, n_structs) \ #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) \ #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) \ #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 JI_END_DECLS

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_BOX_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_BUTTON_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_CLIPBRD_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_COMBOBOX_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_DRAW_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_ENTRY_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_FILE_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_FILESEL_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_FONT_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 #ifndef JINETE_HOOK_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_IMAGE_H
@ -13,7 +38,7 @@ JI_BEGIN_DECLS
struct BITMAP; struct BITMAP;
JWidget ji_image_new(struct BITMAP *bmp, int align); JWidget jimage_new(struct BITMAP *bmp, int align);
JI_END_DECLS JI_END_DECLS

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 #ifndef JINETE_LOW_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_LABEL_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 #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_first_data(list) (jlist_first(list)->data)
#define jlist_last_data(list) (jlist_last(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) \ #define JI_LIST_FOR_EACH(list, link) \
for (link=((JList)(list))->end->next; \ for (link=((JList)(list))->end->next; \
@ -61,6 +86,10 @@ JLink jlist_find(JList list, const void *data);
link!=((JList)(list))->end; \ link!=((JList)(list))->end; \
link=link->prev) 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) \ #define JI_LIST_FOR_EACH_SAFE(list, link, next) \
for (link=((JList)(list))->end->next, next=link->next; \ for (link=((JList)(list))->end->next, next=link->next; \
link!=((JList)(list))->end; \ link!=((JList)(list))->end; \

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_LISTBOX_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_MANAGER_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_MENU_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 #ifndef JINETE_MSG_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_PANEL_H
@ -11,10 +36,10 @@
JI_BEGIN_DECLS JI_BEGIN_DECLS
JWidget ji_panel_new(int align); JWidget jpanel_new(int align);
double ji_panel_get_pos(JWidget panel); double jpanel_get_pos(JWidget panel);
void ji_panel_set_pos(JWidget panel, double pos); void jpanel_set_pos(JWidget panel, double pos);
JI_END_DECLS JI_END_DECLS

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_QCKMENU_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_RECT_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_REGION_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_SCROLL_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_SEP_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_SLIDER_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 #ifndef JINETE_SYSTEM_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_TEXTBOX_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 #ifndef JINETE_THEME_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_VIEW_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 #ifndef JINETE_WIDGET_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #ifndef JINETE_WINDOW_H

View File

@ -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 ifndef JINETE_DIR
JINETE_DIR = . JINETE_DIR = .
@ -46,12 +46,14 @@ JINETE_SOURCES = \
$(JINETE_DIR)/src/jregion.c \ $(JINETE_DIR)/src/jregion.c \
$(JINETE_DIR)/src/jsep.c \ $(JINETE_DIR)/src/jsep.c \
$(JINETE_DIR)/src/jslider.c \ $(JINETE_DIR)/src/jslider.c \
$(JINETE_DIR)/src/jstream.c \
$(JINETE_DIR)/src/jsystem.c \ $(JINETE_DIR)/src/jsystem.c \
$(JINETE_DIR)/src/jtextbox.c \ $(JINETE_DIR)/src/jtextbox.c \
$(JINETE_DIR)/src/jtheme.c \ $(JINETE_DIR)/src/jtheme.c \
$(JINETE_DIR)/src/jview.c \ $(JINETE_DIR)/src/jview.c \
$(JINETE_DIR)/src/jwidget.c \ $(JINETE_DIR)/src/jwidget.c \
$(JINETE_DIR)/src/jwindow.c \ $(JINETE_DIR)/src/jwindow.c \
$(JINETE_DIR)/src/jxml.c \
$(JINETE_DIR)/src/themes/jsimple.c \ $(JINETE_DIR)/src/themes/jsimple.c \
$(JINETE_DIR)/src/themes/jstand.c $(JINETE_DIR)/src/themes/jstand.c
@ -107,13 +109,11 @@ JINETE_EXAMPLES_SOURCES = \
$(JINETE_DIR)/examples/18tips.c \ $(JINETE_DIR)/examples/18tips.c \
$(JINETE_DIR)/examples/19game.c \ $(JINETE_DIR)/examples/19game.c \
$(JINETE_DIR)/examples/20combo.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_EXAMPLES_SOURCES = \
$(JINETE_DIR)/examples/09lists.c $(JINETE_DIR)/examples/22xml.c
# $(JINETE_DIR)/examples/16theme.c\
# $(JINETE_DIR)/examples/17theme.c\
# $(JINETE_DIR)/examples/20combo.c
JINETE_EXAMPLES_OBJS = \ JINETE_EXAMPLES_OBJS = \
$(addprefix $(OBJ_DIR)/, \ $(addprefix $(OBJ_DIR)/, \

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro/keyboard.h> #include <allegro/keyboard.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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.
*/ */
/*********************************************************************** /***********************************************************************

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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) */ /* Based on code from GTK+ 2.1.2 (gtk+/gtk/gtkhbox.c) */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <allegro/gfx.h> #include <allegro/gfx.h>
@ -139,7 +164,7 @@ void jbutton_get_bevel(JWidget widget, int *b4)
} }
void jbutton_add_command(JWidget widget, void jbutton_add_command(JWidget widget,
void (*command_proc)(JWidget widget)) void (*command_proc)(JWidget widget))
{ {
Button *button = jwidget_get_data(widget, widget->type); Button *button = jwidget_get_data(widget, widget->type);
ButtonCommand *command = jnew(ButtonCommand, 1); ButtonCommand *command = jnew(ButtonCommand, 1);
@ -152,9 +177,9 @@ void jbutton_add_command(JWidget widget,
} }
void jbutton_add_command_data(JWidget widget, void jbutton_add_command_data(JWidget widget,
void (*command_proc)(JWidget widget, void (*command_proc)(JWidget widget,
void *data), void *data),
void *data) void *data)
{ {
Button *button = jwidget_get_data(widget, widget->type); Button *button = jwidget_get_data(widget, widget->type);
ButtonCommand *command = jnew(ButtonCommand, 1); ButtonCommand *command = jnew(ButtonCommand, 1);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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" #include "jinete/base.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <allegro.h> #include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <stdio.h> #include <stdio.h>
@ -187,8 +212,8 @@ static JWidget convert_tag_to_widget(Tag *tag)
Attr *horizontal = tag_get_attr(tag, "horizontal"); Attr *horizontal = tag_get_attr(tag, "horizontal");
Attr *vertical = tag_get_attr(tag, "vertical"); Attr *vertical = tag_get_attr(tag, "vertical");
widget = ji_panel_new(horizontal ? JI_HORIZONTAL: widget = jpanel_new(horizontal ? JI_HORIZONTAL:
vertical ? JI_VERTICAL: 0); vertical ? JI_VERTICAL: 0);
} }
/* radio */ /* radio */
else if (strcmp(tag->name, "radio") == 0) { else if (strcmp(tag->name, "radio") == 0) {
@ -483,24 +508,25 @@ static Tag *tag_new(const char *name)
return tag; return tag;
} }
static Tag *tag_new_from_string (char *tag_string) static Tag *tag_new_from_string(char *tag_string)
{ {
char c, *s; char c, *s;
Tag *tag; Tag *tag;
/* find the end of the tag-name */ /* 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 */ /* create the new tag with the found name */
c = *s; c = *s;
*s = 0; *s = 0;
tag = tag_new (tag_string); tag = tag_new(tag_string);
*s = c; *s = c;
/* continue reading attributes */ /* continue reading attributes */
while (*s) { while (*s) {
/* jump white spaces */ /* jump white spaces */
while (*s && IS_BLANK (*s)) while (*s && IS_BLANK(*s))
s++; s++;
/* isn't end of string? */ /* isn't end of string? */
@ -512,7 +538,7 @@ static Tag *tag_new_from_string (char *tag_string)
Attr *attr; Attr *attr;
/* read the attribute-name */ /* read the attribute-name */
while (*s && !IS_BLANK (*s) && *s != '=') while (*s && !IS_BLANK(*s) && *s != '=')
s++; s++;
c = *s; c = *s;
@ -548,7 +574,7 @@ static Tag *tag_new_from_string (char *tag_string)
} }
else { else {
/* read the attribute-value */ /* read the attribute-value */
while (*s && !IS_BLANK (*s)) while (*s && !IS_BLANK(*s))
s++; s++;
} }

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>
@ -103,16 +128,16 @@ char *ji_file_select_ex(const char *message,
ustrcpy (buf, init_path); ustrcpy (buf, init_path);
window = jwindow_new (message); window = jwindow_new (message);
box1 = jbox_new (JI_VERTICAL); box1 = jbox_new(JI_VERTICAL);
box2 = jbox_new (JI_HORIZONTAL); box2 = jbox_new(JI_HORIZONTAL);
box3 = jbox_new (JI_HORIZONTAL | JI_HOMOGENEOUS); box3 = jbox_new(JI_HORIZONTAL | JI_HOMOGENEOUS);
panel = ji_panel_new (JI_HORIZONTAL); panel = jpanel_new(JI_HORIZONTAL);
view1 = jview_new (); view1 = jview_new();
view2 = jview_new (); view2 = jview_new();
listbox1 = jlistbox_new (); listbox1 = jlistbox_new();
listbox2 = jlistbox_new (); listbox2 = jlistbox_new();
button_select = jbutton_new (ji_translate_string ("&OK")); button_select = jbutton_new(ji_translate_string("&OK"));
button_cancel = jbutton_new (ji_translate_string ("&Cancel")); button_cancel = jbutton_new(ji_translate_string("&Cancel"));
/* create input widget (entry_path) */ /* create input widget (entry_path) */
entry_path = NULL; entry_path = NULL;

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 */ /* Based on code of AllegroFont, Copyright (c) 2001, 2002 Javier Gonzalez */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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: /* Original code from:

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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" #include "jinete/hook.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro/draw.h> #include <allegro/draw.h>
@ -16,27 +41,27 @@
static bool image_msg_proc (JWidget widget, JMessage msg); 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_add_hook(widget, JI_IMAGE, image_msg_proc, bmp);
jwidget_set_align (widget, align); jwidget_set_align(widget, align);
return widget; return widget;
} }
static bool image_msg_proc (JWidget widget, JMessage msg) static bool image_msg_proc(JWidget widget, JMessage msg)
{ {
switch (msg->type) { switch (msg->type) {
case JM_REQSIZE: { case JM_REQSIZE: {
BITMAP *bmp = jwidget_get_data (widget, JI_IMAGE); BITMAP *bmp = jwidget_get_data(widget, JI_IMAGE);
struct jrect box, text, icon; struct jrect box, text, icon;
jwidget_get_texticon_info (widget, &box, &text, &icon, jwidget_get_texticon_info(widget, &box, &text, &icon,
jwidget_get_align (widget), jwidget_get_align (widget),
bmp->w, bmp->h); bmp->w, bmp->h);
msg->reqsize.w = widget->border_width.l + jrect_w(&box) + widget->border_width.r; 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; 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: { case JM_DRAW: {
BITMAP *bmp = jwidget_get_data (widget, JI_IMAGE); BITMAP *bmp = jwidget_get_data(widget, JI_IMAGE);
struct jrect box, text, icon; struct jrect box, text, icon;
jwidget_get_texticon_info (widget, &box, &text, &icon, jwidget_get_texticon_info(widget, &box, &text, &icon,
jwidget_get_align (widget), jwidget_get_align (widget),
bmp->w, bmp->h); bmp->w, bmp->h);
jdraw_rectexclude(widget->rc, &icon, jdraw_rectexclude(widget->rc, &icon,
jwidget_get_bg_color(widget)); jwidget_get_bg_color(widget));
blit (bmp, ji_screen, 0, 0, blit(bmp, ji_screen, 0, 0,
icon.x1, icon.y1, jrect_w(&icon), jrect_h(&icon)); icon.x1, icon.y1, jrect_w(&icon), jrect_h(&icon));
return TRUE; return TRUE;
} }
} }

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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" #include "jinete/manager.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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" #include "jinete/message.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 */ /* #define USE_JUNKLIST */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro/keyboard.h> #include <allegro/keyboard.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 */ /* #define REPORT_EVENTS */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <stdlib.h> #include <stdlib.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <allegro/gfx.h> #include <allegro/gfx.h>
@ -1098,7 +1123,7 @@ static JWidget pick_menuitem(JWidget *_menubox, JWidget *open_menubox)
if (MOUSE_IN(menubox->rc)) { if (MOUSE_IN(menubox->rc)) {
*_menubox = menubox; *_menubox = menubox;
picked = jwidget_pick(MBOX(menubox)->menu, 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) if (picked->type != JI_MENUITEM)
picked = NULL; picked = NULL;
break; break;
@ -1150,7 +1175,7 @@ static JWidget find_previtem(JWidget menu, JWidget menuitem)
for (; link != menu->children->end; link=link->prev) { for (; link != menu->children->end; link=link->prev) {
nextitem = (JWidget)link->data; nextitem = (JWidget)link->data;
if ((nextitem->type == JI_MENUITEM) && jwidget_is_enabled (nextitem)) if ((nextitem->type == JI_MENUITEM) && jwidget_is_enabled(nextitem))
return nextitem; return nextitem;
} }

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <allegro/keyboard.h> #include <allegro/keyboard.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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" #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_request_size(JWidget widget, int *w, int *h);
static void panel_set_position(JWidget widget, JRect rect); 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); JWidget widget = jwidget_new(JI_PANEL);
Panel *panel = jnew(Panel, 1); Panel *panel = jnew(Panel, 1);
@ -35,14 +60,14 @@ JWidget ji_panel_new(int align)
return widget; return widget;
} }
double ji_panel_get_pos(JWidget widget) double jpanel_get_pos(JWidget widget)
{ {
Panel *panel = jwidget_get_data(widget, JI_PANEL); Panel *panel = jwidget_get_data(widget, JI_PANEL);
return panel->pos; 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); 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); 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_set_rect(widget, widget->rc);
jwidget_dirty(widget); jwidget_dirty(widget);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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" #include "jinete/accel.h"
@ -79,9 +104,9 @@ static void process_quickmenu(JWidget menu, JQuickMenu quick_menu)
menuitem = jmenuitem_new (quick_menu[c].text); menuitem = jmenuitem_new (quick_menu[c].text);
if (quick_menu[c].accel) { if (quick_menu[c].accel) {
JAccel accel = jaccel_new (); JAccel accel = jaccel_new();
jaccel_add_keys_from_string (accel, quick_menu[c].accel); jaccel_add_keys_from_string(accel, quick_menu[c].accel);
jmenuitem_set_accel (menuitem, accel); jmenuitem_set_accel(menuitem, accel);
} }
if (quick_menu[c].quick_handler) { if (quick_menu[c].quick_handler) {

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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" #include "jinete/rect.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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" #include "jinete/list.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro.h> #include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <allegro.h> #include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 <allegro/keyboard.h> #include <allegro/keyboard.h>
@ -17,24 +42,24 @@
#include "jinete/view.h" #include "jinete/view.h"
#include "jinete/widget.h" #include "jinete/widget.h"
static bool textbox_msg_proc (JWidget widget, JMessage msg); static bool textbox_msg_proc(JWidget widget, JMessage msg);
static void textbox_request_size (JWidget widget, int *w, int *h); 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_add_hook(widget, JI_TEXTBOX, textbox_msg_proc, NULL);
jwidget_focusrest (widget, TRUE); jwidget_focusrest(widget, TRUE);
jwidget_set_align (widget, align); jwidget_set_align(widget, align);
jwidget_set_text (widget, text); jwidget_set_text(widget, text);
jwidget_init_theme (widget); jwidget_init_theme(widget);
return widget; return widget;
} }
static bool textbox_msg_proc (JWidget widget, JMessage msg) static bool textbox_msg_proc(JWidget widget, JMessage msg)
{ {
switch (msg->type) { switch (msg->type) {
@ -44,117 +69,117 @@ static bool textbox_msg_proc (JWidget widget, JMessage msg)
case JM_SIGNAL: case JM_SIGNAL:
if (msg->signal.num == JI_SIGNAL_SET_TEXT) { if (msg->signal.num == JI_SIGNAL_SET_TEXT) {
JWidget view = jwidget_get_view (widget); JWidget view = jwidget_get_view(widget);
if (view) if (view)
jview_update (view); jview_update(view);
} }
break; break;
case JM_CHAR: case JM_CHAR:
if (jwidget_has_focus (widget)) { if (jwidget_has_focus(widget)) {
JWidget view = jwidget_get_view (widget); JWidget view = jwidget_get_view(widget);
if (view) { if (view) {
JRect vp = jview_get_viewport_position (view); JRect vp = jview_get_viewport_position(view);
int textheight = jwidget_get_text_height (widget); int textheight = jwidget_get_text_height(widget);
int scroll_x, scroll_y; 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) { switch (msg->key.scancode) {
case KEY_LEFT: 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; break;
case KEY_RIGHT: 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; break;
case KEY_UP: 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; break;
case KEY_DOWN: 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; break;
case KEY_PGUP: case KEY_PGUP:
jview_set_scroll (view, scroll_x, jview_set_scroll(view, scroll_x,
scroll_y-(jrect_h(vp)-textheight)); scroll_y-(jrect_h(vp)-textheight));
break; break;
case KEY_PGDN: case KEY_PGDN:
jview_set_scroll (view, scroll_x, jview_set_scroll(view, scroll_x,
scroll_y+(jrect_h(vp)-textheight)); scroll_y+(jrect_h(vp)-textheight));
break; break;
case KEY_HOME: case KEY_HOME:
jview_set_scroll (view, scroll_x, 0); jview_set_scroll(view, scroll_x, 0);
break; break;
case KEY_END: case KEY_END:
jview_set_scroll (view, scroll_x, jview_set_scroll(view, scroll_x,
jrect_h(widget->rc) - jrect_h(vp)); jrect_h(widget->rc) - jrect_h(vp));
break; break;
default: default:
jrect_free (vp); jrect_free (vp);
return FALSE; return FALSE;
} }
jrect_free (vp); jrect_free(vp);
} }
return TRUE; return TRUE;
} }
break; break;
case JM_BUTTONPRESSED: { case JM_BUTTONPRESSED: {
JWidget view = jwidget_get_view (widget); JWidget view = jwidget_get_view(widget);
if (view) { if (view) {
jwidget_hard_capture_mouse (widget); jwidget_hard_capture_mouse(widget);
ji_mouse_set_cursor (JI_CURSOR_MOVE); ji_mouse_set_cursor(JI_CURSOR_MOVE);
return TRUE; return TRUE;
} }
break; break;
} }
case JM_MOTION: { case JM_MOTION: {
JWidget view = jwidget_get_view (widget); JWidget view = jwidget_get_view(widget);
if (view && jwidget_has_capture (widget)) { if (view && jwidget_has_capture(widget)) {
JRect vp = jview_get_viewport_position (view); JRect vp = jview_get_viewport_position(view);
int scroll_x, scroll_y; int scroll_x, scroll_y;
jview_get_scroll (view, &scroll_x, &scroll_y); jview_get_scroll(view, &scroll_x, &scroll_y);
jview_set_scroll (view, jview_set_scroll(view,
scroll_x + ji_mouse_x (1) - ji_mouse_x (0), scroll_x + ji_mouse_x(1) - ji_mouse_x(0),
scroll_y + ji_mouse_y (1) - ji_mouse_y (0)); scroll_y + ji_mouse_y(1) - ji_mouse_y(0));
ji_mouse_control_infinite_scroll (vp); ji_mouse_control_infinite_scroll(vp);
jrect_free (vp); jrect_free(vp);
} }
break; break;
} }
case JM_BUTTONRELEASED: { case JM_BUTTONRELEASED: {
JWidget view = jwidget_get_view (widget); JWidget view = jwidget_get_view(widget);
if (view && jwidget_has_capture (widget)) { if (view && jwidget_has_capture(widget)) {
jwidget_release_mouse (widget); jwidget_release_mouse(widget);
ji_mouse_set_cursor (JI_CURSOR_NORMAL); ji_mouse_set_cursor(JI_CURSOR_NORMAL);
return TRUE; return TRUE;
} }
break; break;
} }
case JM_WHEEL: { case JM_WHEEL: {
JWidget view = jwidget_get_view (widget); JWidget view = jwidget_get_view(widget);
if (view) { if (view) {
int scroll_x, scroll_y; int scroll_x, scroll_y;
jview_get_scroll(view, &scroll_x, &scroll_y); jview_get_scroll(view, &scroll_x, &scroll_y);
jview_set_scroll(view, jview_set_scroll(view,
scroll_x, scroll_x,
scroll_y + scroll_y +
(ji_mouse_z (1) - ji_mouse_z (0)) (ji_mouse_z(1) - ji_mouse_z(0))
*jwidget_get_text_height(widget)*3); *jwidget_get_text_height(widget)*3);
} }
break; break;
} }
@ -163,7 +188,7 @@ static bool textbox_msg_proc (JWidget widget, JMessage msg)
return FALSE; 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 */ /* XXX */
/* *w = widget->border_width.l + widget->border_width.r; */ /* *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; *w = 0;
*h = 0; *h = 0;
_ji_theme_textbox_draw (NULL, widget, w, h); _ji_theme_textbox_draw(NULL, widget, w, h);
if (widget->align & JI_WORDWRAP) { if (widget->align & JI_WORDWRAP) {
JWidget view = jwidget_get_view (widget); JWidget view = jwidget_get_view(widget);
int width, min = *w; int width, min = *w;
if (view) { if (view) {
JRect vp = jview_get_viewport_position (view); JRect vp = jview_get_viewport_position(view);
width = jrect_w(vp); width = jrect_w(vp);
jrect_free (vp); jrect_free(vp);
} }
else { else {
width = jrect_w(widget->rc); width = jrect_w(widget->rc);
} }
*w = MAX (min, width); *w = MAX(min, width);
_ji_theme_textbox_draw (NULL, widget, w, h); _ji_theme_textbox_draw(NULL, widget, w, h);
*w = min; *w = min;
} }

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <allegro.h> #include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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" #include "jinete/intern.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 */ /* #define REPORT_SIGNALS */
@ -26,7 +51,7 @@ int ji_register_widget_type (void)
} }
/* creates a new widget with an unique JID */ /* creates a new widget with an unique JID */
JWidget jwidget_new (int type) JWidget jwidget_new(int type)
{ {
JWidget widget = _ji_get_new_widget(); JWidget widget = _ji_get_new_widget();
if (!widget) if (!widget)
@ -75,7 +100,7 @@ JWidget jwidget_new (int type)
return widget; return widget;
} }
void jwidget_free (JWidget widget) void jwidget_free(JWidget widget)
{ {
JLink link, next; JLink link, next;
JMessage msg; JMessage msg;
@ -208,28 +233,28 @@ int jwidget_get_type(JWidget widget)
return widget->type; return widget->type;
} }
const char *jwidget_get_name (JWidget widget) const char *jwidget_get_name(JWidget widget)
{ {
return widget->name; 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); jwidget_emit_signal(widget, JI_SIGNAL_GET_TEXT);
return widget->text; return widget->text;
} }
int jwidget_get_align (JWidget widget) int jwidget_get_align(JWidget widget)
{ {
return widget->align; return widget->align;
} }
FONT *jwidget_get_font (JWidget widget) FONT *jwidget_get_font(JWidget widget)
{ {
return widget->text_font; 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) if (widget->name)
jfree (widget->name); jfree (widget->name);
@ -237,7 +262,7 @@ void jwidget_set_name (JWidget widget, const char *name)
widget->name = name ? jstrdup (name) : NULL; 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) { if (text) {
/* more space needed */ /* 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; widget->align = align;
jwidget_dirty (widget); jwidget_dirty (widget);
} }
void jwidget_set_font (JWidget widget, FONT *font) void jwidget_set_font(JWidget widget, FONT *font)
{ {
widget->text_font = font; widget->text_font = font;
@ -288,7 +313,7 @@ void jwidget_set_font (JWidget widget, FONT *font)
/**********************************************************************/ /**********************************************************************/
/* behavior properties */ /* behavior properties */
void jwidget_magnetic (JWidget widget, bool state) void jwidget_magnetic(JWidget widget, bool state)
{ {
if (state) if (state)
widget->flags |= JI_MAGNETIC; widget->flags |= JI_MAGNETIC;
@ -296,7 +321,7 @@ void jwidget_magnetic (JWidget widget, bool state)
widget->flags &= ~JI_MAGNETIC; widget->flags &= ~JI_MAGNETIC;
} }
void jwidget_expansive (JWidget widget, bool state) void jwidget_expansive(JWidget widget, bool state)
{ {
if (state) if (state)
widget->flags |= JI_EXPANSIVE; widget->flags |= JI_EXPANSIVE;
@ -304,7 +329,7 @@ void jwidget_expansive (JWidget widget, bool state)
widget->flags &= ~JI_EXPANSIVE; widget->flags &= ~JI_EXPANSIVE;
} }
void jwidget_decorative (JWidget widget, bool state) void jwidget_decorative(JWidget widget, bool state)
{ {
if (state) if (state)
widget->flags |= JI_DECORATIVE; widget->flags |= JI_DECORATIVE;
@ -312,7 +337,7 @@ void jwidget_decorative (JWidget widget, bool state)
widget->flags &= ~JI_DECORATIVE; widget->flags &= ~JI_DECORATIVE;
} }
void jwidget_autodestroy (JWidget widget, bool state) void jwidget_autodestroy(JWidget widget, bool state)
{ {
JLink link; JLink link;
@ -325,7 +350,7 @@ void jwidget_autodestroy (JWidget widget, bool state)
jwidget_autodestroy(link->data, state); jwidget_autodestroy(link->data, state);
} }
void jwidget_focusrest (JWidget widget, bool state) void jwidget_focusrest(JWidget widget, bool state)
{ {
if (state) if (state)
widget->flags |= JI_FOCUSREST; widget->flags |= JI_FOCUSREST;
@ -333,27 +358,27 @@ void jwidget_focusrest (JWidget widget, bool state)
widget->flags &= ~JI_FOCUSREST; widget->flags &= ~JI_FOCUSREST;
} }
bool jwidget_is_magnetic (JWidget widget) bool jwidget_is_magnetic(JWidget widget)
{ {
return (widget->flags & JI_MAGNETIC) ? TRUE: FALSE; 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; 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; 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; 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; return (widget->flags & JI_FOCUSREST) ? TRUE: FALSE;
} }
@ -361,7 +386,7 @@ bool jwidget_is_focusrest (JWidget widget)
/**********************************************************************/ /**********************************************************************/
/* status properties */ /* status properties */
void jwidget_dirty (JWidget widget) void jwidget_dirty(JWidget widget)
{ {
#if 0 #if 0
/* is visible? */ /* is visible? */
@ -383,7 +408,7 @@ void jwidget_dirty (JWidget widget)
#endif #endif
} }
void jwidget_show (JWidget widget) void jwidget_show(JWidget widget)
{ {
if (widget->flags & JI_HIDDEN) { if (widget->flags & JI_HIDDEN) {
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)) { if (!(widget->flags & JI_HIDDEN)) {
jmanager_free_widget (widget); /* free from mananger */ 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) { if (widget->flags & JI_DISABLED) {
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)) { if (!(widget->flags & JI_DISABLED)) {
jmanager_free_widget (widget); /* free from the manager */ 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)) { if (!(widget->flags & JI_SELECTED)) {
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) { if (widget->flags & JI_SELECTED) {
widget->flags &= ~JI_SELECTED; widget->flags &= ~JI_SELECTED;
@ -492,17 +517,17 @@ bool jwidget_is_deselected(JWidget widget)
/**********************************************************************/ /**********************************************************************/
/* properties with manager */ /* properties with manager */
bool jwidget_has_focus (JWidget widget) bool jwidget_has_focus(JWidget widget)
{ {
return (widget->flags & JI_HASFOCUS) ? TRUE: FALSE; 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; 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; return (widget->flags & JI_HASCAPTURE) ? TRUE: FALSE;
} }
@ -510,7 +535,7 @@ bool jwidget_has_capture (JWidget widget)
/**********************************************************************/ /**********************************************************************/
/* children handle */ /* children handle */
void jwidget_add_child (JWidget widget, JWidget child) void jwidget_add_child(JWidget widget, JWidget child)
{ {
jlist_append(widget->children, child); jlist_append(widget->children, child);
child->parent = widget; child->parent = widget;
@ -532,7 +557,7 @@ void jwidget_add_childs(JWidget widget, ...)
va_end(ap); va_end(ap);
} }
void jwidget_remove_child (JWidget widget, JWidget child) void jwidget_remove_child(JWidget widget, JWidget child)
{ {
jlist_remove(widget->children, child); jlist_remove(widget->children, child);
child->parent = NULL; child->parent = NULL;
@ -636,7 +661,7 @@ bool jwidget_has_child(JWidget widget, JWidget child)
/**********************************************************************/ /**********************************************************************/
/* position and geometry */ /* 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); JMessage msg = jmessage_new(JM_REQSIZE);
jwidget_send_message(widget, msg); jwidget_send_message(widget, msg);
@ -786,7 +811,7 @@ JRegion jwidget_get_drawable_region(JWidget widget, int flags)
return region; return region;
} }
int jwidget_get_bg_color (JWidget widget) int jwidget_get_bg_color(JWidget widget)
{ {
if (widget->bg_color < 0 && widget->parent) if (widget->bg_color < 0 && widget->parent)
return jwidget_get_bg_color (widget->parent); return jwidget_get_bg_color (widget->parent);
@ -794,12 +819,12 @@ int jwidget_get_bg_color (JWidget widget)
return widget->bg_color; return widget->bg_color;
} }
JTheme jwidget_get_theme (JWidget widget) JTheme jwidget_get_theme(JWidget widget)
{ {
return widget->theme; return widget->theme;
} }
int jwidget_get_text_length (JWidget widget) int jwidget_get_text_length(JWidget widget)
{ {
#if 1 #if 1
return ji_font_text_len (widget->text_font, widget->text); return ji_font_text_len (widget->text_font, widget->text);
@ -808,14 +833,14 @@ int jwidget_get_text_length (JWidget widget)
#endif #endif
} }
int jwidget_get_text_height (JWidget widget) int jwidget_get_text_height(JWidget widget)
{ {
return text_height (widget->text_font); return text_height (widget->text_font);
} }
void jwidget_get_texticon_info (JWidget widget, void jwidget_get_texticon_info(JWidget widget,
JRect box, JRect text, JRect icon, JRect box, JRect text, JRect icon,
int icon_align, int icon_w, int icon_h) int icon_align, int icon_w, int icon_h)
{ {
#define SETRECT(r) \ #define SETRECT(r) \
if (r) { \ if (r) { \
@ -914,7 +939,7 @@ void jwidget_get_texticon_info (JWidget widget,
SETRECT (icon); SETRECT (icon);
} }
void jwidget_noborders (JWidget widget) void jwidget_noborders(JWidget widget)
{ {
widget->border_width.l = 0; widget->border_width.l = 0;
widget->border_width.t = 0; widget->border_width.t = 0;
@ -925,7 +950,7 @@ void jwidget_noborders (JWidget widget)
jwidget_dirty (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.l = l;
widget->border_width.t = t; 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); 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); JMessage msg = jmessage_new (JM_SETPOS);
jrect_copy (&msg->setpos.rect, rect); jrect_copy (&msg->setpos.rect, rect);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello * 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 #define REDRAW_MOVEMENT

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <allegro.h> #include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library /* Jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello * 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 <allegro.h> #include <allegro.h>

Some files were not shown because too many files have changed in this diff Show More