((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/allegro" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "allegro" "game")) (section 2 "allegro" (p "This document pertains to display related methods found in the Allegro egg.") (p "Please see the main [allegro] wiki page for more information.") (toc)) (section 2 "Constants" (ul (li "default-display-adapter") (li "vertex-cache-size"))) (section 2 "Enums" (section 3 "display-flag" (def (sig (procedure "(display-flag->int display-flag)" (id display-flag->int))) (p (tt "display-flag") " may be one of the following symbols:") (ul (li "windowed") (li "fullscreen") (li "opengl") (li "direct3d-internal") (li "resizable") (li "noframe") (li "generate-expose-events") (li "opengl3") (li "opengl-forward-compatible") (li "fullscreen-window") (li "minimized"))) (def (sig (procedure "(int->display-flag integer)" (id int->display-flag))))) (section 3 "display-option" (def (sig (procedure "(display-option->int display-option)" (id display-option->int))) (p (tt "display-option") " may be one of the following symbols:") (ul (li "red-size") (li "green-size") (li "blue-size") (li "alpha-size") (li "red-shift") (li "green-shift") (li "blue-shift") (li "alpha-shift") (li "acc-red-size") (li "acc-green-size") (li "acc-blue-size") (li "acc-alpha-size") (li "stereo") (li "aux-buffers") (li "color-size") (li "depth-size") (li "stencil-size") (li "sample-buffers") (li "samples") (li "render-method") (li "float-color") (li "float-depth") (li "single-buffer") (li "swap-method") (li "compatible-display") (li "update-display-region") (li "vsync") (li "max-bitmap-size") (li "support-npot-bitmap") (li "can-draw-into-bitmap") (li "support-separate-alpha"))) (def (sig (procedure "(int->display-option integer)" (id int->display-option))))) (section 3 "display-option-importance" (def (sig (procedure "(display-option-importance->int display-option-importance)" (id display-option-importance->int))) (p (tt "display-option-importance") " may be one of the following symbols:") (ul (li "dont-care") (li "require") (li "suggest"))) (def (sig (procedure "(int->display-option-importance integer)" (id int->display-option-importance))))) (section 3 "display-orientation" (def (sig (procedure "(display-orientation->int display-orientation)" (id display-orientation->int))) (p (tt "display-orientation") " may be one of the following symbols:") (ul (li "degrees-0") (li "degrees-90") (li "degrees-180") (li "degrees-270") (li "face-up") (li "face-down"))) (def (sig (procedure "(int->display-oprientation integer)" (id int->display-oprientation))))) (section 3 "gl-variant" (def (sig (procedure "(gl-variant->int gl-variant)" (id gl-variant->int))) (p (tt "gl-variant") " may be one of the following symbols:") (ul (li "opengl") (li "opengl-es"))) (def (sig (procedure "(int->gl-variant integer)" (id int->gl-variant)))))) (section 2 "Records" (section 3 "display" (def (sig (record "display" (id display))))) (section 3 "display-mode" (def (sig (record "display-mode" (id display-mode)) (procedure "(make-display-mode*)" (id make-display-mode*)) (procedure "(make-display-mode)" (id make-display-mode)) (procedure "(free-display-mode! display-mode)" (id free-display-mode!)) (procedure "(display-mode-width display-mode)" (id display-mode-width)) (setter "(display-mode-width-set! display-mode integer)" (id display-mode-width-set!)) (procedure "(display-mode-height display-mode)" (id display-mode-height)) (setter "(display-mode-height-set! display-mode integer)" (id display-mode-height-set!)) (procedure "(display-mode-format display-mode)" (id display-mode-format)) (setter "(display-mode-format-set! display-mode pixel-format)" (id display-mode-format-set!)) (procedure "(display-mode-refresh-rate display-mode)" (id display-mode-refresh-rate)) (setter "(display-mode-refresh-rate-set! display-mode integer)" (id display-mode-refresh-rate-set!))))) (section 3 "monitor" (def (sig (record "monitor" (id monitor)) (procedure "(make-monitor*)" (id make-monitor*)) (procedure "(make-monitor)" (id make-monitor)) (procedure "(free-monitor! monitor)" (id free-monitor!)) (procedure "(monitor-x1 monitor)" (id monitor-x1)) (procedure "(monitor-y1 monitor)" (id monitor-y1)) (procedure "(monitor-x2 monitor)" (id monitor-x2)) (procedure "(monitor-y2 monitor)" (id monitor-y2)))))) (section 2 "Functions" (section 3 "Display" (def (sig (procedure "(new-display-refresh-rate)" (id new-display-refresh-rate))) (p "Implements al_get_new_display_refresh_rate.")) (def (sig (procedure "(new-display-refresh-rate-set! integer)" (id new-display-refresh-rate-set!))) (p "Implements al_set_new_display_refresh_rate.")) (def (sig (procedure "(new-display-flags)" (id new-display-flags))) (p "Implements al_get_new_display_flags.")) (def (sig (procedure "(new-display-flags-set! integer)" (id new-display-flags-set!))) (p "Implements al_set_new_display_flags.")) (def (sig (procedure "(new-display-adapter)" (id new-display-adapter))) (p "Implements al_get_new_display_adapter.")) (def (sig (procedure "(new-display-adapter-set! integer)" (id new-display-adapter-set!))) (p "Implements al_set_new_display_adpater.")) (def (sig (procedure "(new-display-window-position)" (id new-display-window-position))) (p "Returns a 2-element list consisting of the new display coordinates.")) (def (sig (procedure "(new-display-window-position-set! (integer x) (integer y))" (id new-display-window-position-set!))) (p "Sets the a new display's window position.")) (def (sig (procedure "(new-display-option-value display-option)" (id new-display-option-value))) (p "Retrieves the value for a particular display-option for newly created displays.")) (def (sig (procedure "(new-display-option-importance display-option)" (id new-display-option-importance))) (p "Retrieves the importance for a particular display-option for newly created dispalys.")) (def (sig (procedure "(new-display-option-set! display-option (integer value) display-option-importance)" (id new-display-option-set!))) (p "Implements al_set_new_display_option.")) (def (sig (procedure "(new-display-reset-options)" (id new-display-reset-options))) (p "Implements al_reset_new_display_options.")) (def (sig (procedure "(make-display* (integer width) (integer height))" (id make-display*))) (p "Implements al_create_display.")) (def (sig (procedure "(make-display (integer width) (integer height))" (id make-display))) (p "Implements al_create_display, with (free-display!) declared as a finalizer.")) (def (sig (procedure "(make-display/mode* display-mode (integer adapter) (integer flags))" (id make-display/mode*))) (p "Creates a new display, taking the refresh rate, width and height from a display-mode struct.")) (def (sig (procedure "(make-display/mode display-mode (integer adapter) (integer flags))" (id make-display/mode))) (p "Creates a new display, taking the refresh rate, width and height from a display-mode struct, with (free-display-mode!) declared as a finalizer.")) (def (sig (procedure "(free-display! display)" (id free-display!))) (p "Implements al_destroy_display.")) (def (sig (procedure "(current-display)" (id current-display))) (p "Implements al_get_current_display.")) (def (sig (procedure "(display-mode-count)" (id display-mode-count))) (p "Implements al_get_num_display_modes.")) (def (sig (procedure "(display-mode-init! display-mode (integer index))" (id display-mode-init!))) (p "Implements al_get_display_mode, returning #f if unsuccessful.")) (def (sig (procedure "(update-display-region! (integer x) (integer y) (integer width) (integer height))" (id update-display-region!))) (p "Implements al_update_display_region.")) (def (sig (procedure "(compatible-bitmap? bitmap)" (id compatible-bitmap?))) (p "Implements al_is_compatible_bitmap.")) (def (sig (procedure "(wait-for-vsync)" (id wait-for-vsync))) (p "Implements al_wait_for_vsync.")) (def (sig (procedure "(draw-pixel (float x) (floay y) color)" (id draw-pixel))) (p "Implements al_draw_pixel.")) (def (sig (procedure "(video-adapter-count)" (id video-adapter-count))) (p "Implements al_get_num_video_adapters.")) (def (sig (procedure "(monitor-init! monitor (integer adapter))" (id monitor-init!))) (p "Implements al_get_monitor_info.")) (def (sig (procedure "(display-option display display-option)" (id display-option))) (p "Implements al_get_display_option.")) (def (sig (setter "(display-hold-bitmap-drawing! bool)" (id display-hold-bitmap-drawing!))) (p "Implements al_hold_bitmap_drawing.")) (def (sig (procedure "(display-bitmap-drawing-held?)" (id display-bitmap-drawing-held?))) (p "Implements al_is_bitmap_drawing_help.")) (def (sig (procedure "(display-window-title-set! display string)" (id display-window-title-set!))) (p "Implements al_set_window_title.")) (def (sig (procedure "(display-width display)" (id display-width))) (p "Implements al_get_display_width.")) (def (sig (procedure "(display-height display)" (id display-height))) (p "Implements al_get_display_height.")) (def (sig (procedure "(display-format display)" (id display-format))) (p "Implements al_get_display_format.")) (def (sig (procedure "(display-refresh-rate display)" (id display-refresh-rate))) (p "Implements al_get_display_refresh_rate.")) (def (sig (procedure "(display-flags display)" (id display-flags))) (p "Implements al_get_display_flags.")) (def (sig (procedure "(display-toggle-flag! display display-flag bool)" (id display-toggle-flag!))) (p "Implements al_toggle_display_flag.")) (def (sig (procedure "(display-backbuffer display)" (id display-backbuffer))) (p "Implements al_get_backbuffer.")) (def (sig (procedure "(display-acknowledge-resize display)" (id display-acknowledge-resize))) (p "Implements al_acknowledge_resize.")) (def (sig (procedure "(display-resize! display (integer width) (integer height))" (id display-resize!))) (p "Implements al_resize_display.")) (def (sig (procedure "(display-event-source display)" (id display-event-source))) (p "Implements al_get_display_event_source.")) (def (sig (procedure "(display-iconset! display bitmap)" (id display-iconset!))) (p "Implements al_set_display_icon.")) (def (sig (procedure "(clear-to-color color)" (id clear-to-color))) (p "Implements al_clear_to_color.")) (def (sig (procedure "(target-bitmap)" (id target-bitmap))) (p "Implements al_get_target_bitmap.")) (def (sig (procedure "(target-bitmap-set! bitmap)" (id target-bitmap-set!))) (p "Implements al_set_target_bitmap.")) (def (sig (procedure "(target-backbuffer-set! display)" (id target-backbuffer-set!))) (p "Implements al_set_target_backbuffer.")) (def (sig (procedure "(flip-display)" (id flip-display))) (p "Implements al_flip_display."))) (section 3 "Direct3D" (def (sig (procedure "(d3d-non-pow2-texture-support?)" (id d3d-non-pow2-texture-support?))) (p "Implements al_have_d3d_non_pow2_texture_support.")) (def (sig (procedure "(d3d-non-square-texture-support?)" (id d3d-non-square-texture-support?))) (p "Implements al_have_d3d_non_square_texture_support.")) (section 4 "Bitmap Specific" (def (sig (procedure "(bitmap-d3d-system-texture bitmap)" (id bitmap-d3d-system-texture))) (p "Implements al_get_d3d_system_texture.")) (def (sig (procedure "(bitmap-d3d-video-texture bitmap)" (id bitmap-d3d-video-texture))) (p "Implements al_get_d3d_video_texture.")) (def (sig (procedure "(bitmap-d3d-texture-position bitmap)" (id bitmap-d3d-texture-position))) (p "Returns a 2-element list consisting of a u, v pair."))) (section 4 "Display Specific" (def (sig (procedure "(display-d3d-device-lost? display)" (id display-d3d-device-lost?))) (p "Implements al_is_d3d_device_lost.")) (def (sig (procedure "(display-d3d-device display)" (id display-d3d-device))) (p "Implements al_get_d3d_device.")))) (section 3 "OpenGL" (def (sig (procedure "(opengl-addon-version)" (id opengl-addon-version))) (p "Implements al_get_opengl_version.")) (def (sig (procedure "(opengl-extension-exists? string)" (id opengl-extension-exists?))) (p "Implements al_have_opengl_extension.")) (def (sig (procedure "(opengl-proc-address string)" (id opengl-proc-address))) (p "Implements al_get_opengl_proc_address.")) (def (sig (procedure "(opengl-texture bitmap)" (id opengl-texture))) (p "Implements al_get_opengl_texture.")) (def (sig (procedure "(opengl-remove-fbo! bitmap)" (id opengl-remove-fbo!))) (p "Implements al_remove_opengl_fbo.")) (def (sig (procedure "(opengl-fbo bitmap)" (id opengl-fbo))) (p "Implements al_get_opengl_fbo.")) (def (sig (procedure "(opengl-texture-size bitmap)" (id opengl-texture-size))) (p "Returns a 2-element list of the width and height of the opengl texture for the given bitmap.")) (def (sig (procedure "(opengl-texture-position bitmap)" (id opengl-texture-position))) (p "Returns a 2-element list of the u,v position of the opengl texture for the given bitmap.")) (def (sig (procedure "(opengl-context-set! display)" (id opengl-context-set!))) (p "Implements al_set_current_opengl_context.")) (def (sig (procedure "(opengl-variant)" (id opengl-variant))) (p "Implements al_get_opengl_variant."))) (section 3 "Windows" (def (sig (procedure "(windows-window-handle)" (id windows-window-handle))) (p "Implements al_get_win_window_handle.")))))