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>
* 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.
- Allegro and Jinete are gift-ware (doesn't have restrictions).
- Allegro is giftware license (similar to MIT license).
- Jinete is under BSD license.
- ALFONT is under LGPL terms.
- quantize.c is copyright by Ben Davis (you need his authorization to
use his code in your own program).
@ -15,5 +16,9 @@ LEGAL ISSUES
- Libart 2.3.3 is distributed under LGPL license.
- Libintl is distributed under LGPL license.
- The FreeType Project is distributed under FTL license.
- zlib & Libpng are under the ZLIB license.
You can find all these licenses in the "docs/licenses" directory.
You can find all these licenses in the "docs/licenses" directory,
or you can found them in:
http://www.opensource.org/licenses/alphabetical

279
NEWS.txt
View File

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

View File

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

View File

@ -266,7 +266,7 @@ F&rame FRAME_POPUP {
"Fi&lm Editor" FILMEDITOR_ACCEL = has_sprite "switch_between_film_and_sprite_editor()" <Tab> ;
"&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 ;

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> ;
"&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 ;

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
* Copyright (C) 2003-2005 by David A. Capello
* Copyright (C) 2003-2005, 2007 by David A. Capello
*
* Jinete is gift-ware.
*/
@ -8,55 +8,57 @@
#include "jinete.h"
int main (int argc, char *argv[])
int main(int argc, char *argv[])
{
/* widgets to use */
JWidget manager, window, box, label, button;
/* Allegro stuff */
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
allegro_init();
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();
install_mouse ();
install_timer();
install_keyboard();
install_mouse();
/* Jinete initialization */
manager = jmanager_new ();
ji_set_standard_theme ();
manager = jmanager_new();
ji_set_standard_theme();
/* create main window */
window = jwindow_new ("Example 00");
window = jwindow_new("Example 00");
/* 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 */
label = jlabel_new ("Hello World!");
jwidget_set_align (label, JI_CENTER | JI_MIDDLE);
label = jlabel_new("Hello World!");
jwidget_set_align(label, JI_CENTER | JI_MIDDLE);
/* 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 */
jwidget_expansive (label, TRUE);
jwidget_expansive(label, TRUE);
/* put the label and button in the box and that box in the window */
jwidget_add_child (box, label);
jwidget_add_child (box, button);
jwidget_add_child (window, box);
jwidget_add_child(box, label);
jwidget_add_child(box, button);
jwidget_add_child(window, box);
/* show the window in the screen and leave it in the background (the
manager will free it) */
jwindow_open_bg (window);
jwindow_open_bg(window);
/* run windows */
jmanager_run (manager);
jmanager_run(manager);
/* Jinete finalization */
jmanager_free (manager);
jmanager_free(manager);
return 0;
}

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -14,9 +39,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -14,9 +39,11 @@ int main (int argc, char *argv[])
JWidget manager, window, box, label1, label2, label3, label4;
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,62 +1,89 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
#include "jinete.h"
int main (int argc, char *argv[])
int main(int argc, char *argv[])
{
JWidget manager, window, box;
JWidget slider1, slider2, slider3, slider4, slider5, button1;
/* Allegro stuff */
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
allegro_init();
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();
install_mouse ();
install_timer();
install_keyboard();
install_mouse();
/* Jinete initialization */
manager = jmanager_new ();
ji_set_standard_theme ();
manager = jmanager_new();
ji_set_standard_theme();
window = jwindow_new ("Example 03");
box = jbox_new (JI_VERTICAL);
slider1 = jslider_new (0, 1, 0);
slider2 = jslider_new (0, 2, 0);
slider3 = jslider_new (0, 10, 0);
slider4 = jslider_new (0, 63, 1);
slider5 = jslider_new (0, 255, 1);
button1 = jbutton_new ("&Close");
window = jwindow_new("Example 03");
box = jbox_new(JI_VERTICAL);
slider1 = jslider_new(0, 1, 0);
slider2 = jslider_new(0, 2, 0);
slider3 = jslider_new(0, 10, 0);
slider4 = jslider_new(0, 63, 1);
slider5 = jslider_new(0, 255, 1);
button1 = jbutton_new("&Close");
jwidget_set_static_size (slider1, 128, 0);
jwidget_set_static_size (slider2, 128, 0);
jwidget_set_static_size (slider3, 128, 0);
jwidget_set_static_size (slider4, 128, 0);
jwidget_set_static_size (slider5, 128, 0);
jwidget_set_static_size(slider1, 128, 0);
jwidget_set_static_size(slider2, 128, 0);
jwidget_set_static_size(slider3, 128, 0);
jwidget_set_static_size(slider4, 128, 0);
jwidget_set_static_size(slider5, 128, 0);
jwidget_expansive (slider1, TRUE);
jwidget_expansive (slider2, TRUE);
jwidget_expansive (slider3, TRUE);
jwidget_expansive (slider4, TRUE);
jwidget_expansive (slider5, TRUE);
jwidget_expansive(slider1, TRUE);
jwidget_expansive(slider2, TRUE);
jwidget_expansive(slider3, TRUE);
jwidget_expansive(slider4, TRUE);
jwidget_expansive(slider5, TRUE);
jwidget_add_child (window, box);
jwidget_add_childs (box,
slider1, slider2, slider3,
slider4, slider5, button1, NULL);
jwidget_add_child(window, box);
jwidget_add_childs(box,
slider1, slider2, slider3,
slider4, slider5, button1, NULL);
jwindow_open_bg (window);
jwindow_open_bg(window);
jmanager_run (manager);
jmanager_free (manager);
jmanager_run(manager);
jmanager_free(manager);
return 0;
}

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -14,23 +39,25 @@ int main (int argc, char *argv[])
int ret;
/* Allegro stuff */
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
allegro_init();
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();
install_mouse ();
install_timer();
install_keyboard();
install_mouse();
/* Jinete initialization */
manager = jmanager_new ();
ji_set_standard_theme ();
manager = jmanager_new();
ji_set_standard_theme();
jmanager_refresh_screen ();
ji_mouse_set_cursor (JI_CURSOR_NORMAL);
jmanager_refresh_screen();
ji_mouse_set_cursor(JI_CURSOR_NORMAL);
jalert ("Normal==First Alert||&Ok");
jalert("Normal==First Alert||&Ok");
jalert ("Error"
"==This is a long text line"
"--"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -16,9 +41,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -16,9 +41,11 @@ int main (int argc, char *argv[])
allegro_init ();
set_color_depth (8);
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -12,24 +37,26 @@ int main (int argc, char *argv[])
{
JWidget manager, window, box1, box2, view1, view2, button;
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
allegro_init();
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();
install_mouse ();
install_timer();
install_keyboard();
install_mouse();
manager = jmanager_new ();
ji_set_standard_theme ();
manager = jmanager_new();
ji_set_standard_theme();
window = jwindow_new ("Example 07");
box1 = jbox_new (JI_VERTICAL);
box2 = ji_panel_new (JI_HORIZONTAL);
view1 = jview_new ();
view2 = jview_new ();
button = jbutton_new ("&Close");
window = jwindow_new("Example 07");
box1 = jbox_new(JI_VERTICAL);
box2 = jpanel_new(JI_HORIZONTAL);
view1 = jview_new();
view2 = jview_new();
button = jbutton_new("&Close");
jwidget_expansive (view1, TRUE);
jwidget_expansive (view2, TRUE);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -69,9 +94,11 @@ int main (int argc, char *argv[])
JWidget manager;
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -19,9 +44,11 @@ int main(int argc, char *argv[])
JRect pos;
allegro_init();
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer();
install_keyboard();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -25,9 +50,11 @@ int main (int argc, char *argv[])
int c;
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -16,9 +41,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */
allegro_init ();
if (set_gfx_mode (GFX_SAFE, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -38,9 +63,11 @@ int main (int argc, char *argv[])
JWidget manager, window, box, button, menubar;
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -9,10 +34,10 @@
#include "jinete.h"
static JWidget new_menuitem (const char *text, const char *accel_string);
static bool hooked_menuitem_msg_proc (JWidget widget, JMessage msg);
static JWidget new_menuitem(const char *text, const char *accel_string);
static bool hooked_menuitem_msg_proc(JWidget widget, JMessage msg);
int main (int argc, char *argv[])
int main(int argc, char *argv[])
{
JWidget manager, window, box1, button;
JWidget menu;
@ -38,103 +63,105 @@ int main (int argc, char *argv[])
JWidget menuitem_edit_paste;
JWidget menuitem_edit_clear;
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
allegro_init();
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();
install_mouse ();
install_timer();
install_keyboard();
install_mouse();
manager = jmanager_new ();
ji_set_standard_theme ();
manager = jmanager_new();
ji_set_standard_theme();
window = jwindow_new ("Menus");
box1 = jbox_new (JI_VERTICAL);
button = jbutton_new ("&Close");
menu = jmenu_new ();
menubar = jmenubar_new ();
menuitem_file = jmenuitem_new ("&File");
menuitem_edit = jmenuitem_new ("&Edit");
menuitem_tool = new_menuitem ("&Tools", NULL);
menuitem_help = new_menuitem ("&Help", NULL);
menu_file = jmenu_new ();
menuitem_file_new = jmenuitem_new ("&New");
menuitem_file_open = new_menuitem ("&Open", "<Ctrl+O>");
menuitem_file_save = new_menuitem ("&Save", "<Ctrl+S>"); jwidget_disable (menuitem_file_save);
menuitem_file_sep1 = ji_separator_new (NULL, JI_HORIZONTAL);
menuitem_file_quit = new_menuitem ("&Quit", "<Ctrl+Q>");
menu_filenew = jmenu_new ();
menuitem_filenew_sprite = new_menuitem ("&Sprite", NULL);
menuitem_filenew_image = new_menuitem ("&Image", NULL);
menuitem_filenew_font = new_menuitem ("&Font", NULL);
menuitem_filenew_palette = new_menuitem ("&Palette", NULL);
window = jwindow_new("Menus");
box1 = jbox_new(JI_VERTICAL);
button = jbutton_new("&Close");
menu = jmenu_new();
menubar = jmenubar_new();
menuitem_file = jmenuitem_new("&File");
menuitem_edit = jmenuitem_new("&Edit");
menuitem_tool = new_menuitem("&Tools", NULL);
menuitem_help = new_menuitem("&Help", NULL);
menu_file = jmenu_new();
menuitem_file_new = jmenuitem_new("&New");
menuitem_file_open = new_menuitem("&Open", "<Ctrl+O>");
menuitem_file_save = new_menuitem("&Save", "<Ctrl+S>"); jwidget_disable (menuitem_file_save);
menuitem_file_sep1 = ji_separator_new(NULL, JI_HORIZONTAL);
menuitem_file_quit = new_menuitem("&Quit", "<Ctrl+Q>");
menu_filenew = jmenu_new();
menuitem_filenew_sprite = new_menuitem("&Sprite", NULL);
menuitem_filenew_image = new_menuitem("&Image", NULL);
menuitem_filenew_font = new_menuitem("&Font", NULL);
menuitem_filenew_palette = new_menuitem("&Palette", NULL);
menu_edit = jmenu_new ();
menuitem_edit_cut = new_menuitem ("Cu&t", "<Shift+Del>");
menuitem_edit_copy = new_menuitem ("&Copy", "<Ctrl+Ins>");
menuitem_edit_paste = new_menuitem ("&Paste", "<Shift+Ins>");
menuitem_edit_clear = new_menuitem ("C&lear", "<Ctrl+Del>");
menuitem_edit_cut = new_menuitem("Cu&t", "<Shift+Del>");
menuitem_edit_copy = new_menuitem("&Copy", "<Ctrl+Ins>");
menuitem_edit_paste = new_menuitem("&Paste", "<Shift+Ins>");
menuitem_edit_clear = new_menuitem("C&lear", "<Ctrl+Del>");
jwidget_add_child (menu_file, menuitem_file_new);
jwidget_add_child (menu_file, menuitem_file_open);
jwidget_add_child (menu_file, menuitem_file_save);
jwidget_add_child (menu_file, menuitem_file_sep1);
jwidget_add_child (menu_file, menuitem_file_quit);
jmenuitem_set_submenu (menuitem_file, menu_file);
jwidget_add_child(menu_file, menuitem_file_new);
jwidget_add_child(menu_file, menuitem_file_open);
jwidget_add_child(menu_file, menuitem_file_save);
jwidget_add_child(menu_file, menuitem_file_sep1);
jwidget_add_child(menu_file, menuitem_file_quit);
jmenuitem_set_submenu(menuitem_file, menu_file);
jwidget_add_child (menu_filenew, menuitem_filenew_sprite);
jwidget_add_child (menu_filenew, menuitem_filenew_image);
jwidget_add_child (menu_filenew, menuitem_filenew_font);
jwidget_add_child (menu_filenew, menuitem_filenew_palette);
jmenuitem_set_submenu (menuitem_file_new, menu_filenew);
jwidget_add_child(menu_filenew, menuitem_filenew_sprite);
jwidget_add_child(menu_filenew, menuitem_filenew_image);
jwidget_add_child(menu_filenew, menuitem_filenew_font);
jwidget_add_child(menu_filenew, menuitem_filenew_palette);
jmenuitem_set_submenu(menuitem_file_new, menu_filenew);
jwidget_add_child (menu_edit, menuitem_edit_cut);
jwidget_add_child (menu_edit, menuitem_edit_copy);
jwidget_add_child (menu_edit, menuitem_edit_paste);
jwidget_add_child (menu_edit, menuitem_edit_clear);
jmenuitem_set_submenu (menuitem_edit, menu_edit);
jwidget_add_child(menu_edit, menuitem_edit_cut);
jwidget_add_child(menu_edit, menuitem_edit_copy);
jwidget_add_child(menu_edit, menuitem_edit_paste);
jwidget_add_child(menu_edit, menuitem_edit_clear);
jmenuitem_set_submenu(menuitem_edit, menu_edit);
jwidget_add_child (menu, menuitem_file);
jwidget_add_child (menu, menuitem_edit);
jwidget_add_child (menu, menuitem_tool);
jwidget_add_child (menu, menuitem_help);
jmenubar_set_menu (menubar, menu);
jwidget_add_child(menu, menuitem_file);
jwidget_add_child(menu, menuitem_edit);
jwidget_add_child(menu, menuitem_tool);
jwidget_add_child(menu, menuitem_help);
jmenubar_set_menu(menubar, menu);
jwidget_add_child (box1, menubar);
jwidget_add_child (box1, button);
jwidget_add_child (window, box1);
jwidget_add_child(box1, menubar);
jwidget_add_child(box1, button);
jwidget_add_child(window, box1);
jwindow_open_bg (window);
jwindow_open_bg(window);
jmanager_run (manager);
jmanager_free (manager);
jmanager_run(manager);
jmanager_free(manager);
return 0;
}
END_OF_MAIN ();
END_OF_MAIN();
static JWidget new_menuitem (const char *text, const char *accel_string)
static JWidget new_menuitem(const char *text, const char *accel_string)
{
JWidget menuitem = jmenuitem_new (text);
JAccel accel = jaccel_new ();
JWidget menuitem = jmenuitem_new(text);
JAccel accel = jaccel_new();
jwidget_add_hook (menuitem, JI_WIDGET,
hooked_menuitem_msg_proc, NULL);
jwidget_add_hook(menuitem, JI_WIDGET,
hooked_menuitem_msg_proc, NULL);
if (accel_string)
jaccel_add_keys_from_string (accel, accel_string);
jaccel_add_keys_from_string(accel, accel_string);
jmenuitem_set_accel (menuitem, accel);
jmenuitem_set_accel(menuitem, accel);
return menuitem;
}
static bool hooked_menuitem_msg_proc (JWidget widget, JMessage msg)
static bool hooked_menuitem_msg_proc(JWidget widget, JMessage msg)
{
if (msg->type == JM_SIGNAL &&
msg->signal.num == JI_SIGNAL_MENUITEM_SELECT)
printf ("Selected item: %s\n", widget->text);
printf("Selected item: %s\n", widget->text);
return FALSE;
}

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -15,9 +40,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */
allegro_init();
if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer();
install_keyboard();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -25,9 +50,11 @@ int main (int argc, char *argv[])
JWidget manager, window1, box1, button1, button2, button3, button4, button5;
allegro_init();
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer();
install_keyboard();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -19,9 +44,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -24,11 +49,15 @@ int main (int argc, char *argv[])
/* Allegro stuff */
allegro_init ();
set_color_depth (16);
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
set_color_depth (8);
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
set_color_depth (8);
if (set_gfx_mode (GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
}
}
}
}
install_timer ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -16,9 +41,11 @@ int main (int argc, char *argv[])
JWidget manager, window, box, check1, check2, button1, button2;
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();
@ -132,7 +159,7 @@ static JWidget tip_window_new(const char *text)
jwidget_set_align(window, JI_CENTER | JI_MIDDLE);
/* remove decorative widgets */
JI_LIST_FOR_EACH_SAFE(window->children, link, next)
JI_LIST_EACH_SAFE(window->children, link, next)
jwidget_free(link->data);
jwidget_add_hook(window, JI_WIDGET, tip_window_hook, NULL);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -28,9 +53,11 @@ int main(int argc, char *argv[])
{
/* Allegro stuff */
allegro_init();
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer();
install_keyboard();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -17,9 +42,11 @@ int main (int argc, char *argv[])
/* Allegro stuff */
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -16,57 +41,59 @@ int main (int argc, char *argv[])
/* Allegro stuff */
allegro_init ();
if (set_gfx_mode (GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message ("%s\n", allegro_error);
return 1;
if (set_gfx_mode(GFX_AUTODETECT_WINDOWED, 320, 200, 0, 0) < 0) {
if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) < 0) {
allegro_message("%s\n", allegro_error);
return 1;
}
}
install_timer ();
install_keyboard ();
install_mouse ();
/* Jinete initialization */
manager1 = jmanager_new ();
ji_set_standard_theme ();
manager2 = jmanager_new ();
manager3 = jmanager_new ();
manager1 = jmanager_new();
ji_set_standard_theme();
manager2 = jmanager_new();
manager3 = jmanager_new();
window1 = jwindow_new ("Window1");
window2 = jwindow_new ("Window2");
window3 = jwindow_new ("Window3");
view2 = jview_new ();
view3 = jview_new ();
window1 = jwindow_new("Window1");
window2 = jwindow_new("Window2");
window3 = jwindow_new("Window3");
view2 = jview_new();
view3 = jview_new();
jview_attach (view2, manager2);
jview_attach (view3, manager3);
jview_attach(view2, manager2);
jview_attach(view3, manager3);
jwidget_add_child (window1, view2);
jwidget_add_child (window2, view3);
jwidget_add_child(window1, view2);
jwidget_add_child(window2, view3);
jwindow_remap (window1);
jwindow_remap (window2);
jwindow_remap (window3);
jwindow_remap(window1);
jwindow_remap(window2);
jwindow_remap(window3);
rect = jrect_new (JI_SCREEN_W/2-100, JI_SCREEN_H/2-70,
JI_SCREEN_W/2+100, JI_SCREEN_H/2+70);
jwidget_set_rect (window1, rect);
jrect_free (rect);
rect = jrect_new(JI_SCREEN_W/2-100, JI_SCREEN_H/2-70,
JI_SCREEN_W/2+100, JI_SCREEN_H/2+70);
jwidget_set_rect(window1, rect);
jrect_free(rect);
rect = jrect_new (JI_SCREEN_W/2-90, JI_SCREEN_H/2-50,
JI_SCREEN_W/2+90, JI_SCREEN_H/2+50);
jwidget_set_rect (window2, rect);
jrect_free (rect);
rect = jrect_new(JI_SCREEN_W/2-90, JI_SCREEN_H/2-50,
JI_SCREEN_W/2+90, JI_SCREEN_H/2+50);
jwidget_set_rect(window2, rect);
jrect_free(rect);
rect = jrect_new (JI_SCREEN_W/2-80, JI_SCREEN_H/2-30,
JI_SCREEN_W/2+80, JI_SCREEN_H/2+30);
jwidget_set_rect (window3, rect);
jrect_free (rect);
rect = jrect_new(JI_SCREEN_W/2-80, JI_SCREEN_H/2-30,
JI_SCREEN_W/2+80, JI_SCREEN_H/2+30);
jwidget_set_rect(window3, rect);
jrect_free(rect);
jwindow_open_bg (window1);
jwindow_open_bg(window1);
_jmanager_open_window(manager2, window2);
_jmanager_open_window(manager3, window3);
jmanager_run (manager1);
jmanager_free (manager1);
jmanager_run(manager1);
jmanager_free(manager1);
return 0;
}

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_H
@ -34,11 +59,13 @@
#include "jinete/scroll.h"
#include "jinete/sep.h"
#include "jinete/slider.h"
#include "jinete/stream.h"
#include "jinete/system.h"
#include "jinete/textbox.h"
#include "jinete/theme.h"
#include "jinete/view.h"
#include "jinete/widget.h"
#include "jinete/window.h"
#include "jinete/xml.h"
#endif /* JINETE_H */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_ACCEL_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_ALERT_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_BASE_H
@ -207,10 +232,16 @@ typedef struct jquickmenu *JQuickMenu;
typedef struct jlink *JLink;
typedef struct jlist *JList;
typedef union jmessage *JMessage;
typedef struct jstream *JStream;
typedef struct jrect *JRect;
typedef struct jregion *JRegion;
typedef struct jtheme *JTheme;
typedef struct jwidget *JWidget;
typedef struct jxml *JXml;
typedef struct jxmlattr *JXmlAttr;
typedef struct jxmlnode *JXmlNode;
typedef struct jxmlelem *JXmlElem;
typedef struct jxmltext *JXmlText;
typedef void (*JFunc) (void *data, void *user_data);
typedef int (*JCompareFunc) (const void *a, const void *b);
@ -219,19 +250,19 @@ typedef bool (*JMessageFunc) (JWidget widget, JMessage msg);
typedef void (*JDrawFunc) (JWidget widget);
/* memory routines */
void *jmalloc (unsigned long n_bytes);
void *jmalloc0 (unsigned long n_bytes);
void *jrealloc (void *mem, unsigned long n_bytes);
void jfree (void *mem);
void *jmalloc (unsigned long n_bytes);
void *jmalloc0(unsigned long n_bytes);
void *jrealloc(void *mem, unsigned long n_bytes);
void jfree (void *mem);
char *jstrdup (const char *string);
char *jstrdup (const char *string);
#define jnew(struct_type, n_structs) \
((struct_type *)jmalloc (sizeof (struct_type) * (n_structs)))
((struct_type *)jmalloc(sizeof (struct_type) * (n_structs)))
#define jnew0(struct_type, n_structs) \
((struct_type *)jmalloc0 (sizeof (struct_type) * (n_structs)))
((struct_type *)jmalloc0(sizeof (struct_type) * (n_structs)))
#define jrenew(struct_type, mem, n_structs) \
((struct_type *)jrealloc ((mem), (sizeof (struct_type) * (n_structs))))
((struct_type *)jrealloc((mem), (sizeof (struct_type) * (n_structs))))
JI_END_DECLS

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_BOX_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_BUTTON_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_CLIPBRD_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_COMBOBOX_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_DRAW_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_ENTRY_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_FILE_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_FILESEL_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_FONT_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_HOOK_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_IMAGE_H
@ -13,7 +38,7 @@ JI_BEGIN_DECLS
struct BITMAP;
JWidget ji_image_new(struct BITMAP *bmp, int align);
JWidget jimage_new(struct BITMAP *bmp, int align);
JI_END_DECLS

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_LOW_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_LABEL_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_LIST_H
@ -49,7 +74,7 @@ JLink jlist_find(JList list, const void *data);
#define jlist_first_data(list) (jlist_first(list)->data)
#define jlist_last_data(list) (jlist_last(list)->data)
#define jlist_empty(list) (!((JList)(list))->length)
#define jlist_empty(list) (((JList)(list))->length == 0)
#define JI_LIST_FOR_EACH(list, link) \
for (link=((JList)(list))->end->next; \
@ -61,6 +86,10 @@ JLink jlist_find(JList list, const void *data);
link!=((JList)(list))->end; \
link=link->prev)
/**
* Iterator for each item of the list (the body of the "for" can be
* remove elements in the list).
*/
#define JI_LIST_FOR_EACH_SAFE(list, link, next) \
for (link=((JList)(list))->end->next, next=link->next; \
link!=((JList)(list))->end; \

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_LISTBOX_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_MANAGER_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_MENU_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_MSG_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_PANEL_H
@ -11,10 +36,10 @@
JI_BEGIN_DECLS
JWidget ji_panel_new(int align);
JWidget jpanel_new(int align);
double ji_panel_get_pos(JWidget panel);
void ji_panel_set_pos(JWidget panel, double pos);
double jpanel_get_pos(JWidget panel);
void jpanel_set_pos(JWidget panel, double pos);
JI_END_DECLS

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_QCKMENU_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_RECT_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_REGION_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_SCROLL_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_SEP_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_SLIDER_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_SYSTEM_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_TEXTBOX_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_THEME_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_VIEW_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_WIDGET_H

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef JINETE_WINDOW_H

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

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro/keyboard.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/***********************************************************************

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* Based on code from GTK+ 2.1.2 (gtk+/gtk/gtkhbox.c) */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro/gfx.h>
@ -139,7 +164,7 @@ void jbutton_get_bevel(JWidget widget, int *b4)
}
void jbutton_add_command(JWidget widget,
void (*command_proc)(JWidget widget))
void (*command_proc)(JWidget widget))
{
Button *button = jwidget_get_data(widget, widget->type);
ButtonCommand *command = jnew(ButtonCommand, 1);
@ -152,9 +177,9 @@ void jbutton_add_command(JWidget widget,
}
void jbutton_add_command_data(JWidget widget,
void (*command_proc)(JWidget widget,
void *data),
void *data)
void (*command_proc)(JWidget widget,
void *data),
void *data)
{
Button *button = jwidget_get_data(widget, widget->type);
ButtonCommand *command = jnew(ButtonCommand, 1);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "jinete/base.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdio.h>
@ -187,8 +212,8 @@ static JWidget convert_tag_to_widget(Tag *tag)
Attr *horizontal = tag_get_attr(tag, "horizontal");
Attr *vertical = tag_get_attr(tag, "vertical");
widget = ji_panel_new(horizontal ? JI_HORIZONTAL:
vertical ? JI_VERTICAL: 0);
widget = jpanel_new(horizontal ? JI_HORIZONTAL:
vertical ? JI_VERTICAL: 0);
}
/* radio */
else if (strcmp(tag->name, "radio") == 0) {
@ -483,24 +508,25 @@ static Tag *tag_new(const char *name)
return tag;
}
static Tag *tag_new_from_string (char *tag_string)
static Tag *tag_new_from_string(char *tag_string)
{
char c, *s;
Tag *tag;
/* find the end of the tag-name */
for (s=tag_string; *s && !IS_BLANK (*s); s++);
for (s=tag_string; *s && !IS_BLANK (*s); s++)
;
/* create the new tag with the found name */
c = *s;
*s = 0;
tag = tag_new (tag_string);
tag = tag_new(tag_string);
*s = c;
/* continue reading attributes */
while (*s) {
/* jump white spaces */
while (*s && IS_BLANK (*s))
while (*s && IS_BLANK(*s))
s++;
/* isn't end of string? */
@ -512,7 +538,7 @@ static Tag *tag_new_from_string (char *tag_string)
Attr *attr;
/* read the attribute-name */
while (*s && !IS_BLANK (*s) && *s != '=')
while (*s && !IS_BLANK(*s) && *s != '=')
s++;
c = *s;
@ -548,7 +574,7 @@ static Tag *tag_new_from_string (char *tag_string)
}
else {
/* read the attribute-value */
while (*s && !IS_BLANK (*s))
while (*s && !IS_BLANK(*s))
s++;
}

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>
@ -103,16 +128,16 @@ char *ji_file_select_ex(const char *message,
ustrcpy (buf, init_path);
window = jwindow_new (message);
box1 = jbox_new (JI_VERTICAL);
box2 = jbox_new (JI_HORIZONTAL);
box3 = jbox_new (JI_HORIZONTAL | JI_HOMOGENEOUS);
panel = ji_panel_new (JI_HORIZONTAL);
view1 = jview_new ();
view2 = jview_new ();
listbox1 = jlistbox_new ();
listbox2 = jlistbox_new ();
button_select = jbutton_new (ji_translate_string ("&OK"));
button_cancel = jbutton_new (ji_translate_string ("&Cancel"));
box1 = jbox_new(JI_VERTICAL);
box2 = jbox_new(JI_HORIZONTAL);
box3 = jbox_new(JI_HORIZONTAL | JI_HOMOGENEOUS);
panel = jpanel_new(JI_HORIZONTAL);
view1 = jview_new();
view2 = jview_new();
listbox1 = jlistbox_new();
listbox2 = jlistbox_new();
button_select = jbutton_new(ji_translate_string("&OK"));
button_cancel = jbutton_new(ji_translate_string("&Cancel"));
/* create input widget (entry_path) */
entry_path = NULL;

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* Based on code of AllegroFont, Copyright (c) 2001, 2002 Javier Gonzalez */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* Original code from:

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "jinete/hook.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro/draw.h>
@ -16,27 +41,27 @@
static bool image_msg_proc (JWidget widget, JMessage msg);
JWidget ji_image_new (BITMAP *bmp, int align)
JWidget jimage_new(BITMAP *bmp, int align)
{
JWidget widget = jwidget_new (JI_IMAGE);
JWidget widget = jwidget_new(JI_IMAGE);
jwidget_add_hook (widget, JI_IMAGE, image_msg_proc, bmp);
jwidget_set_align (widget, align);
jwidget_add_hook(widget, JI_IMAGE, image_msg_proc, bmp);
jwidget_set_align(widget, align);
return widget;
}
static bool image_msg_proc (JWidget widget, JMessage msg)
static bool image_msg_proc(JWidget widget, JMessage msg)
{
switch (msg->type) {
case JM_REQSIZE: {
BITMAP *bmp = jwidget_get_data (widget, JI_IMAGE);
BITMAP *bmp = jwidget_get_data(widget, JI_IMAGE);
struct jrect box, text, icon;
jwidget_get_texticon_info (widget, &box, &text, &icon,
jwidget_get_align (widget),
bmp->w, bmp->h);
jwidget_get_texticon_info(widget, &box, &text, &icon,
jwidget_get_align (widget),
bmp->w, bmp->h);
msg->reqsize.w = widget->border_width.l + jrect_w(&box) + widget->border_width.r;
msg->reqsize.h = widget->border_width.t + jrect_h(&box) + widget->border_width.b;
@ -44,18 +69,18 @@ static bool image_msg_proc (JWidget widget, JMessage msg)
}
case JM_DRAW: {
BITMAP *bmp = jwidget_get_data (widget, JI_IMAGE);
BITMAP *bmp = jwidget_get_data(widget, JI_IMAGE);
struct jrect box, text, icon;
jwidget_get_texticon_info (widget, &box, &text, &icon,
jwidget_get_align (widget),
bmp->w, bmp->h);
jwidget_get_texticon_info(widget, &box, &text, &icon,
jwidget_get_align (widget),
bmp->w, bmp->h);
jdraw_rectexclude(widget->rc, &icon,
jwidget_get_bg_color(widget));
blit (bmp, ji_screen, 0, 0,
icon.x1, icon.y1, jrect_w(&icon), jrect_h(&icon));
blit(bmp, ji_screen, 0, 0,
icon.x1, icon.y1, jrect_w(&icon), jrect_h(&icon));
return TRUE;
}
}

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "jinete/manager.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "jinete/message.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* #define USE_JUNKLIST */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro/keyboard.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* #define REPORT_EVENTS */

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <stdlib.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro/gfx.h>
@ -1098,7 +1123,7 @@ static JWidget pick_menuitem(JWidget *_menubox, JWidget *open_menubox)
if (MOUSE_IN(menubox->rc)) {
*_menubox = menubox;
picked = jwidget_pick(MBOX(menubox)->menu,
ji_mouse_x(0), ji_mouse_y(0));
ji_mouse_x(0), ji_mouse_y(0));
if (picked->type != JI_MENUITEM)
picked = NULL;
break;
@ -1150,7 +1175,7 @@ static JWidget find_previtem(JWidget menu, JWidget menuitem)
for (; link != menu->children->end; link=link->prev) {
nextitem = (JWidget)link->data;
if ((nextitem->type == JI_MENUITEM) && jwidget_is_enabled (nextitem))
if ((nextitem->type == JI_MENUITEM) && jwidget_is_enabled(nextitem))
return nextitem;
}

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro/keyboard.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "jinete/list.h"
@ -20,7 +45,7 @@ static bool panel_msg_proc(JWidget widget, JMessage msg);
static void panel_request_size(JWidget widget, int *w, int *h);
static void panel_set_position(JWidget widget, JRect rect);
JWidget ji_panel_new(int align)
JWidget jpanel_new(int align)
{
JWidget widget = jwidget_new(JI_PANEL);
Panel *panel = jnew(Panel, 1);
@ -35,14 +60,14 @@ JWidget ji_panel_new(int align)
return widget;
}
double ji_panel_get_pos(JWidget widget)
double jpanel_get_pos(JWidget widget)
{
Panel *panel = jwidget_get_data(widget, JI_PANEL);
return panel->pos;
}
void ji_panel_set_pos(JWidget widget, double pos)
void jpanel_set_pos(JWidget widget, double pos)
{
Panel *panel = jwidget_get_data(widget, JI_PANEL);
@ -133,7 +158,7 @@ static bool panel_msg_proc(JWidget widget, JMessage msg)
100.0 * (msg->mouse.y-widget->rc->y1) / jrect_h(widget->rc);
}
panel->pos = MID (0, panel->pos, 100);
panel->pos = MID(0, panel->pos, 100);
jwidget_set_rect(widget, widget->rc);
jwidget_dirty(widget);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "jinete/accel.h"
@ -79,9 +104,9 @@ static void process_quickmenu(JWidget menu, JQuickMenu quick_menu)
menuitem = jmenuitem_new (quick_menu[c].text);
if (quick_menu[c].accel) {
JAccel accel = jaccel_new ();
jaccel_add_keys_from_string (accel, quick_menu[c].accel);
jmenuitem_set_accel (menuitem, accel);
JAccel accel = jaccel_new();
jaccel_add_keys_from_string(accel, quick_menu[c].accel);
jmenuitem_set_accel(menuitem, accel);
}
if (quick_menu[c].quick_handler) {

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "jinete/rect.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "jinete/list.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro/keyboard.h>
@ -17,24 +42,24 @@
#include "jinete/view.h"
#include "jinete/widget.h"
static bool textbox_msg_proc (JWidget widget, JMessage msg);
static void textbox_request_size (JWidget widget, int *w, int *h);
static bool textbox_msg_proc(JWidget widget, JMessage msg);
static void textbox_request_size(JWidget widget, int *w, int *h);
JWidget jtextbox_new (const char *text, int align)
JWidget jtextbox_new(const char *text, int align)
{
JWidget widget = jwidget_new (JI_TEXTBOX);
JWidget widget = jwidget_new(JI_TEXTBOX);
jwidget_add_hook (widget, JI_TEXTBOX, textbox_msg_proc, NULL);
jwidget_focusrest (widget, TRUE);
jwidget_set_align (widget, align);
jwidget_set_text (widget, text);
jwidget_add_hook(widget, JI_TEXTBOX, textbox_msg_proc, NULL);
jwidget_focusrest(widget, TRUE);
jwidget_set_align(widget, align);
jwidget_set_text(widget, text);
jwidget_init_theme (widget);
jwidget_init_theme(widget);
return widget;
}
static bool textbox_msg_proc (JWidget widget, JMessage msg)
static bool textbox_msg_proc(JWidget widget, JMessage msg)
{
switch (msg->type) {
@ -44,117 +69,117 @@ static bool textbox_msg_proc (JWidget widget, JMessage msg)
case JM_SIGNAL:
if (msg->signal.num == JI_SIGNAL_SET_TEXT) {
JWidget view = jwidget_get_view (widget);
JWidget view = jwidget_get_view(widget);
if (view)
jview_update (view);
jview_update(view);
}
break;
case JM_CHAR:
if (jwidget_has_focus (widget)) {
JWidget view = jwidget_get_view (widget);
if (jwidget_has_focus(widget)) {
JWidget view = jwidget_get_view(widget);
if (view) {
JRect vp = jview_get_viewport_position (view);
int textheight = jwidget_get_text_height (widget);
JRect vp = jview_get_viewport_position(view);
int textheight = jwidget_get_text_height(widget);
int scroll_x, scroll_y;
jview_get_scroll (view, &scroll_x, &scroll_y);
jview_get_scroll(view, &scroll_x, &scroll_y);
switch (msg->key.scancode) {
case KEY_LEFT:
jview_set_scroll (view, scroll_x-jrect_w(vp)/2, scroll_y);
jview_set_scroll(view, scroll_x-jrect_w(vp)/2, scroll_y);
break;
case KEY_RIGHT:
jview_set_scroll (view, scroll_x+jrect_w(vp)/2, scroll_y);
jview_set_scroll(view, scroll_x+jrect_w(vp)/2, scroll_y);
break;
case KEY_UP:
jview_set_scroll (view, scroll_x, scroll_y-jrect_h(vp)/2);
jview_set_scroll(view, scroll_x, scroll_y-jrect_h(vp)/2);
break;
case KEY_DOWN:
jview_set_scroll (view, scroll_x, scroll_y+jrect_h(vp)/2);
jview_set_scroll(view, scroll_x, scroll_y+jrect_h(vp)/2);
break;
case KEY_PGUP:
jview_set_scroll (view, scroll_x,
scroll_y-(jrect_h(vp)-textheight));
jview_set_scroll(view, scroll_x,
scroll_y-(jrect_h(vp)-textheight));
break;
case KEY_PGDN:
jview_set_scroll (view, scroll_x,
scroll_y+(jrect_h(vp)-textheight));
jview_set_scroll(view, scroll_x,
scroll_y+(jrect_h(vp)-textheight));
break;
case KEY_HOME:
jview_set_scroll (view, scroll_x, 0);
jview_set_scroll(view, scroll_x, 0);
break;
case KEY_END:
jview_set_scroll (view, scroll_x,
jrect_h(widget->rc) - jrect_h(vp));
jview_set_scroll(view, scroll_x,
jrect_h(widget->rc) - jrect_h(vp));
break;
default:
jrect_free (vp);
return FALSE;
}
jrect_free (vp);
jrect_free(vp);
}
return TRUE;
}
break;
case JM_BUTTONPRESSED: {
JWidget view = jwidget_get_view (widget);
JWidget view = jwidget_get_view(widget);
if (view) {
jwidget_hard_capture_mouse (widget);
ji_mouse_set_cursor (JI_CURSOR_MOVE);
jwidget_hard_capture_mouse(widget);
ji_mouse_set_cursor(JI_CURSOR_MOVE);
return TRUE;
}
break;
}
case JM_MOTION: {
JWidget view = jwidget_get_view (widget);
if (view && jwidget_has_capture (widget)) {
JRect vp = jview_get_viewport_position (view);
JWidget view = jwidget_get_view(widget);
if (view && jwidget_has_capture(widget)) {
JRect vp = jview_get_viewport_position(view);
int scroll_x, scroll_y;
jview_get_scroll (view, &scroll_x, &scroll_y);
jview_set_scroll (view,
scroll_x + ji_mouse_x (1) - ji_mouse_x (0),
scroll_y + ji_mouse_y (1) - ji_mouse_y (0));
jview_get_scroll(view, &scroll_x, &scroll_y);
jview_set_scroll(view,
scroll_x + ji_mouse_x(1) - ji_mouse_x(0),
scroll_y + ji_mouse_y(1) - ji_mouse_y(0));
ji_mouse_control_infinite_scroll (vp);
jrect_free (vp);
ji_mouse_control_infinite_scroll(vp);
jrect_free(vp);
}
break;
}
case JM_BUTTONRELEASED: {
JWidget view = jwidget_get_view (widget);
if (view && jwidget_has_capture (widget)) {
jwidget_release_mouse (widget);
ji_mouse_set_cursor (JI_CURSOR_NORMAL);
JWidget view = jwidget_get_view(widget);
if (view && jwidget_has_capture(widget)) {
jwidget_release_mouse(widget);
ji_mouse_set_cursor(JI_CURSOR_NORMAL);
return TRUE;
}
break;
}
case JM_WHEEL: {
JWidget view = jwidget_get_view (widget);
JWidget view = jwidget_get_view(widget);
if (view) {
int scroll_x, scroll_y;
jview_get_scroll(view, &scroll_x, &scroll_y);
jview_set_scroll(view,
scroll_x,
scroll_y +
(ji_mouse_z (1) - ji_mouse_z (0))
*jwidget_get_text_height(widget)*3);
scroll_x,
scroll_y +
(ji_mouse_z(1) - ji_mouse_z(0))
*jwidget_get_text_height(widget)*3);
}
break;
}
@ -163,7 +188,7 @@ static bool textbox_msg_proc (JWidget widget, JMessage msg)
return FALSE;
}
static void textbox_request_size (JWidget widget, int *w, int *h)
static void textbox_request_size(JWidget widget, int *w, int *h)
{
/* XXX */
/* *w = widget->border_width.l + widget->border_width.r; */
@ -171,23 +196,23 @@ static void textbox_request_size (JWidget widget, int *w, int *h)
*w = 0;
*h = 0;
_ji_theme_textbox_draw (NULL, widget, w, h);
_ji_theme_textbox_draw(NULL, widget, w, h);
if (widget->align & JI_WORDWRAP) {
JWidget view = jwidget_get_view (widget);
JWidget view = jwidget_get_view(widget);
int width, min = *w;
if (view) {
JRect vp = jview_get_viewport_position (view);
JRect vp = jview_get_viewport_position(view);
width = jrect_w(vp);
jrect_free (vp);
jrect_free(vp);
}
else {
width = jrect_w(widget->rc);
}
*w = MAX (min, width);
_ji_theme_textbox_draw (NULL, widget, w, h);
*w = MAX(min, width);
_ji_theme_textbox_draw(NULL, widget, w, h);
*w = min;
}

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "jinete/intern.h"

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* #define REPORT_SIGNALS */
@ -26,7 +51,7 @@ int ji_register_widget_type (void)
}
/* creates a new widget with an unique JID */
JWidget jwidget_new (int type)
JWidget jwidget_new(int type)
{
JWidget widget = _ji_get_new_widget();
if (!widget)
@ -75,7 +100,7 @@ JWidget jwidget_new (int type)
return widget;
}
void jwidget_free (JWidget widget)
void jwidget_free(JWidget widget)
{
JLink link, next;
JMessage msg;
@ -208,28 +233,28 @@ int jwidget_get_type(JWidget widget)
return widget->type;
}
const char *jwidget_get_name (JWidget widget)
const char *jwidget_get_name(JWidget widget)
{
return widget->name;
}
const char *jwidget_get_text (JWidget widget)
const char *jwidget_get_text(JWidget widget)
{
jwidget_emit_signal(widget, JI_SIGNAL_GET_TEXT);
return widget->text;
}
int jwidget_get_align (JWidget widget)
int jwidget_get_align(JWidget widget)
{
return widget->align;
}
FONT *jwidget_get_font (JWidget widget)
FONT *jwidget_get_font(JWidget widget)
{
return widget->text_font;
}
void jwidget_set_name (JWidget widget, const char *name)
void jwidget_set_name(JWidget widget, const char *name)
{
if (widget->name)
jfree (widget->name);
@ -237,7 +262,7 @@ void jwidget_set_name (JWidget widget, const char *name)
widget->name = name ? jstrdup (name) : NULL;
}
void jwidget_set_text (JWidget widget, const char *text)
void jwidget_set_text(JWidget widget, const char *text)
{
if (text) {
/* more space needed */
@ -264,14 +289,14 @@ void jwidget_set_text (JWidget widget, const char *text)
}
}
void jwidget_set_align (JWidget widget, int align)
void jwidget_set_align(JWidget widget, int align)
{
widget->align = align;
jwidget_dirty (widget);
}
void jwidget_set_font (JWidget widget, FONT *font)
void jwidget_set_font(JWidget widget, FONT *font)
{
widget->text_font = font;
@ -288,7 +313,7 @@ void jwidget_set_font (JWidget widget, FONT *font)
/**********************************************************************/
/* behavior properties */
void jwidget_magnetic (JWidget widget, bool state)
void jwidget_magnetic(JWidget widget, bool state)
{
if (state)
widget->flags |= JI_MAGNETIC;
@ -296,7 +321,7 @@ void jwidget_magnetic (JWidget widget, bool state)
widget->flags &= ~JI_MAGNETIC;
}
void jwidget_expansive (JWidget widget, bool state)
void jwidget_expansive(JWidget widget, bool state)
{
if (state)
widget->flags |= JI_EXPANSIVE;
@ -304,7 +329,7 @@ void jwidget_expansive (JWidget widget, bool state)
widget->flags &= ~JI_EXPANSIVE;
}
void jwidget_decorative (JWidget widget, bool state)
void jwidget_decorative(JWidget widget, bool state)
{
if (state)
widget->flags |= JI_DECORATIVE;
@ -312,7 +337,7 @@ void jwidget_decorative (JWidget widget, bool state)
widget->flags &= ~JI_DECORATIVE;
}
void jwidget_autodestroy (JWidget widget, bool state)
void jwidget_autodestroy(JWidget widget, bool state)
{
JLink link;
@ -325,7 +350,7 @@ void jwidget_autodestroy (JWidget widget, bool state)
jwidget_autodestroy(link->data, state);
}
void jwidget_focusrest (JWidget widget, bool state)
void jwidget_focusrest(JWidget widget, bool state)
{
if (state)
widget->flags |= JI_FOCUSREST;
@ -333,27 +358,27 @@ void jwidget_focusrest (JWidget widget, bool state)
widget->flags &= ~JI_FOCUSREST;
}
bool jwidget_is_magnetic (JWidget widget)
bool jwidget_is_magnetic(JWidget widget)
{
return (widget->flags & JI_MAGNETIC) ? TRUE: FALSE;
}
bool jwidget_is_expansive (JWidget widget)
bool jwidget_is_expansive(JWidget widget)
{
return (widget->flags & JI_EXPANSIVE) ? TRUE: FALSE;
}
bool jwidget_is_decorative (JWidget widget)
bool jwidget_is_decorative(JWidget widget)
{
return (widget->flags & JI_DECORATIVE) ? TRUE: FALSE;
}
bool jwidget_is_autodestroy (JWidget widget)
bool jwidget_is_autodestroy(JWidget widget)
{
return (widget->flags & JI_AUTODESTROY) ? TRUE: FALSE;
}
bool jwidget_is_focusrest (JWidget widget)
bool jwidget_is_focusrest(JWidget widget)
{
return (widget->flags & JI_FOCUSREST) ? TRUE: FALSE;
}
@ -361,7 +386,7 @@ bool jwidget_is_focusrest (JWidget widget)
/**********************************************************************/
/* status properties */
void jwidget_dirty (JWidget widget)
void jwidget_dirty(JWidget widget)
{
#if 0
/* is visible? */
@ -383,7 +408,7 @@ void jwidget_dirty (JWidget widget)
#endif
}
void jwidget_show (JWidget widget)
void jwidget_show(JWidget widget)
{
if (widget->flags & JI_HIDDEN) {
widget->flags &= ~JI_HIDDEN;
@ -393,7 +418,7 @@ void jwidget_show (JWidget widget)
}
}
void jwidget_hide (JWidget widget)
void jwidget_hide(JWidget widget)
{
if (!(widget->flags & JI_HIDDEN)) {
jmanager_free_widget (widget); /* free from mananger */
@ -403,7 +428,7 @@ void jwidget_hide (JWidget widget)
}
}
void jwidget_enable (JWidget widget)
void jwidget_enable(JWidget widget)
{
if (widget->flags & JI_DISABLED) {
widget->flags &= ~JI_DISABLED;
@ -413,7 +438,7 @@ void jwidget_enable (JWidget widget)
}
}
void jwidget_disable (JWidget widget)
void jwidget_disable(JWidget widget)
{
if (!(widget->flags & JI_DISABLED)) {
jmanager_free_widget (widget); /* free from the manager */
@ -425,7 +450,7 @@ void jwidget_disable (JWidget widget)
}
}
void jwidget_select (JWidget widget)
void jwidget_select(JWidget widget)
{
if (!(widget->flags & JI_SELECTED)) {
widget->flags |= JI_SELECTED;
@ -435,7 +460,7 @@ void jwidget_select (JWidget widget)
}
}
void jwidget_deselect (JWidget widget)
void jwidget_deselect(JWidget widget)
{
if (widget->flags & JI_SELECTED) {
widget->flags &= ~JI_SELECTED;
@ -492,17 +517,17 @@ bool jwidget_is_deselected(JWidget widget)
/**********************************************************************/
/* properties with manager */
bool jwidget_has_focus (JWidget widget)
bool jwidget_has_focus(JWidget widget)
{
return (widget->flags & JI_HASFOCUS) ? TRUE: FALSE;
}
bool jwidget_has_mouse (JWidget widget)
bool jwidget_has_mouse(JWidget widget)
{
return (widget->flags & JI_HASMOUSE) ? TRUE: FALSE;
}
bool jwidget_has_capture (JWidget widget)
bool jwidget_has_capture(JWidget widget)
{
return (widget->flags & JI_HASCAPTURE) ? TRUE: FALSE;
}
@ -510,7 +535,7 @@ bool jwidget_has_capture (JWidget widget)
/**********************************************************************/
/* children handle */
void jwidget_add_child (JWidget widget, JWidget child)
void jwidget_add_child(JWidget widget, JWidget child)
{
jlist_append(widget->children, child);
child->parent = widget;
@ -532,7 +557,7 @@ void jwidget_add_childs(JWidget widget, ...)
va_end(ap);
}
void jwidget_remove_child (JWidget widget, JWidget child)
void jwidget_remove_child(JWidget widget, JWidget child)
{
jlist_remove(widget->children, child);
child->parent = NULL;
@ -636,7 +661,7 @@ bool jwidget_has_child(JWidget widget, JWidget child)
/**********************************************************************/
/* position and geometry */
void jwidget_request_size (JWidget widget, int *w, int *h)
void jwidget_request_size(JWidget widget, int *w, int *h)
{
JMessage msg = jmessage_new(JM_REQSIZE);
jwidget_send_message(widget, msg);
@ -786,7 +811,7 @@ JRegion jwidget_get_drawable_region(JWidget widget, int flags)
return region;
}
int jwidget_get_bg_color (JWidget widget)
int jwidget_get_bg_color(JWidget widget)
{
if (widget->bg_color < 0 && widget->parent)
return jwidget_get_bg_color (widget->parent);
@ -794,12 +819,12 @@ int jwidget_get_bg_color (JWidget widget)
return widget->bg_color;
}
JTheme jwidget_get_theme (JWidget widget)
JTheme jwidget_get_theme(JWidget widget)
{
return widget->theme;
}
int jwidget_get_text_length (JWidget widget)
int jwidget_get_text_length(JWidget widget)
{
#if 1
return ji_font_text_len (widget->text_font, widget->text);
@ -808,14 +833,14 @@ int jwidget_get_text_length (JWidget widget)
#endif
}
int jwidget_get_text_height (JWidget widget)
int jwidget_get_text_height(JWidget widget)
{
return text_height (widget->text_font);
}
void jwidget_get_texticon_info (JWidget widget,
JRect box, JRect text, JRect icon,
int icon_align, int icon_w, int icon_h)
void jwidget_get_texticon_info(JWidget widget,
JRect box, JRect text, JRect icon,
int icon_align, int icon_w, int icon_h)
{
#define SETRECT(r) \
if (r) { \
@ -914,7 +939,7 @@ void jwidget_get_texticon_info (JWidget widget,
SETRECT (icon);
}
void jwidget_noborders (JWidget widget)
void jwidget_noborders(JWidget widget)
{
widget->border_width.l = 0;
widget->border_width.t = 0;
@ -925,7 +950,7 @@ void jwidget_noborders (JWidget widget)
jwidget_dirty (widget);
}
void jwidget_set_border (JWidget widget, int l, int t, int r, int b)
void jwidget_set_border(JWidget widget, int l, int t, int r, int b)
{
widget->border_width.l = l;
widget->border_width.t = t;
@ -935,7 +960,7 @@ void jwidget_set_border (JWidget widget, int l, int t, int r, int b)
jwidget_dirty (widget);
}
void jwidget_set_rect (JWidget widget, JRect rect)
void jwidget_set_rect(JWidget widget, JRect rect)
{
JMessage msg = jmessage_new (JM_SETPOS);
jrect_copy (&msg->setpos.rect, rect);

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define REDRAW_MOVEMENT

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>

View File

@ -1,7 +1,32 @@
/* jinete - a GUI library
* Copyright (C) 2003-2005, 2007 by David A. Capello
/* Jinete - a GUI library
* Copyright (c) 2003, 2004, 2005, 2007, David A. Capello
* All rights reserved.
*
* Jinete is gift-ware.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of the Jinete nor the names of its contributors may
* be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <allegro.h>

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