indexing description: "Eiffel Vision application. Implementation interface.%NSee ev_application.e" legal: "See notice at end of class." status: "See notice at end of class." keywords: "application" date: "$Date: 2008-02-14 02:30:05 -0800 (Thu, 14 Feb 2008) $" revision: "$Revision: 72306 $" deferred class interface EV_APPLICATION_I feature -- Access alt_pressed: BOOLEAN -- Is alt key currently pressed? c_memory: INTEGER_32 is 2 -- Code for the C memory managed -- by the garbage collector -- (from MEM_CONST) caps_lock_on: BOOLEAN -- Is the Caps Lock key currently on? captured_widget: EV_WIDGET -- Widget currently captured. Void if none. check_instruction: INTEGER_32 is 7 -- Exception code for violated check -- (from EXCEP_CONST) class_invariant: INTEGER_32 is 6 -- Exception code for violated class invariant -- (from EXCEP_CONST) clipboard: EV_CLIPBOARD -- Native platform clipboard access. com_exception: INTEGER_32 is 28 -- Exception code for a COM error. -- (from EXCEP_CONST) contextual_help_accelerator: EV_ACCELERATOR -- Accelerator that enables contextual help mode create_on_deferred: INTEGER_32 is 17 -- Create on deferred -- (from EXCEP_CONST) ctrl_pressed: BOOLEAN -- Is ctrl key currently pressed? developer_exception: INTEGER_32 is 24 -- Exception code for developer exception -- (from EXCEP_CONST) dollar_applied_to_melted_feature: INTEGER_32 is 26 -- $ applied to melted feature -- (from EXCEP_CONST) eiffel_memory: INTEGER_32 is 1 -- Code for the Eiffel memory managed -- by the garbage collector -- (from MEM_CONST) eiffel_runtime_fatal_error: INTEGER_32 is 25 -- Eiffel run-time fatal error -- (from EXCEP_CONST) eiffel_runtime_panic: INTEGER_32 is 13 -- Eiffel run-time panic -- (from EXCEP_CONST) exception_in_signal_handler: INTEGER_32 is 20 -- Exception in signal handler -- (from EXCEP_CONST) exception_manager: EXCEPTION_MANAGER -- Exception manager -- (from EXCEPTION_MANAGER_FACTORY) ensure -- from EXCEPTION_MANAGER_FACTORY exception_manager_not_void: Result /= Void external_exception: INTEGER_32 is 18 -- Exception code for operating system error -- which does not set the `errno' variable -- (Unix-specific) -- (from EXCEP_CONST) floating_point_exception: INTEGER_32 is 5 -- Exception code for floating point exception -- (from EXCEP_CONST) full_collector: INTEGER_32 is 0 -- Statistics for full collections -- (from MEM_CONST) generating_type: STRING_8 -- Name of current object's generating type -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generating_type_not_empty: not Result.is_empty generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty help_accelerator: EV_ACCELERATOR -- Accelerator that displays contextual help help_engine: EV_HELP_ENGINE -- Object that handle contextual help display requests incorrect_inspect_value: INTEGER_32 is 9 -- Exception code for inspect value which is not one -- of the inspect constants, if there is no Else_part -- (from EXCEP_CONST) incremental_collector: INTEGER_32 is 1 -- Statistics for incremental collections -- (from MEM_CONST) invoke_garbage_collection_when_inactive: BOOLEAN -- Should garbage collection be invoked when application is inactive. io_exception: INTEGER_32 is 21 -- Exception code for I/O error -- (from EXCEP_CONST) is_display_remote: BOOLEAN -- Is application display remote? -- This function is primarily to determine if drawing to the display is optimal. locked_window: EV_WINDOW -- Window currently locked. Void if no window -- is currently locked. -- -- See `{EV_WINDOW}.lock_update' for more details loop_invariant: INTEGER_32 is 11 -- Exception code for violated loop invariant -- (from EXCEP_CONST) loop_variant: INTEGER_32 is 10 -- Exception code for non-decreased loop variant -- (from EXCEP_CONST) no_more_memory: INTEGER_32 is 2 -- Exception code for failed memory allocation -- (from EXCEP_CONST) number_of_codes: INTEGER_32 is 31 -- How many codes are there to represent exceptions? -- (from EXCEP_CONST) old_exception: INTEGER_32 is 30 -- Old exception code. -- (from EXCEP_CONST) operating_system_exception: INTEGER_32 is 22 -- Exception code for operating system error -- which sets the `errno' variable -- (Unix-specific) -- (from EXCEP_CONST) out_of_memory: INTEGER_32 is 15 -- Out of memory (cannot be ignored) -- (from EXCEP_CONST) pick_and_drop_source: EV_PICK_AND_DROPABLE_I -- The current pick and drop source. pnd_targets: HASH_TABLE [INTEGER_32, INTEGER_32] -- Global list of pick and drop target object ids. postcondition: INTEGER_32 is 4 -- Exception code for violated postcondition -- (from EXCEP_CONST) precondition: INTEGER_32 is 3 -- Exception code for violated precondition -- (from EXCEP_CONST) rescue_exception: INTEGER_32 is 14 -- Exception code for exception in rescue clause -- (from EXCEP_CONST) resumption_failed: INTEGER_32 is 16 -- Resumption failed (retry did not succeed) -- (from EXCEP_CONST) retrieve_exception: INTEGER_32 is 23 -- Exception code for retrieval error -- may be raised by `retrieved' in `IO_MEDIUM'. -- (from EXCEP_CONST) routine_failure: INTEGER_32 is 8 -- Exception code for failed routine -- (from EXCEP_CONST) runtime_check_exception: INTEGER_32 is 29 -- Exception code for runtime check being violated. -- (from EXCEP_CONST) runtime_io_exception: INTEGER_32 is 27 -- Exception code for I/O error raised by runtime functions -- such as store/retrieve, file access... -- (from EXCEP_CONST) serialization_exception: INTEGER_32 is 31 -- Serialization exception code. -- (from EXCEP_CONST) shift_pressed: BOOLEAN -- Is shift key currently pressed? signal_exception: INTEGER_32 is 12 -- Exception code for operating system signal -- (from EXCEP_CONST) total_memory: INTEGER_32 is 0 -- Code for all the memory managed -- by the garbage collector -- (from MEM_CONST) transport_in_progress: BOOLEAN -- Is a Pick and Drop transport currently in progress? valid_code (c: INTEGER_32): BOOLEAN -- Is `c' a valid code to represent some kind of exceptions? -- (from EXCEP_CONST) void_assigned_to_expanded: INTEGER_32 is 19 -- Exception code for assignment of void value -- to expanded entity -- (from EXCEP_CONST) void_call_target: INTEGER_32 is 1 -- Exception code for feature applied to void reference -- (from EXCEP_CONST) windows: LINEAR [EV_WINDOW] -- Global list of windows. feature -- Measurement gc_statistics (collector_type: INTEGER_32): GC_INFO -- Garbage collection information for `collector_type'. -- (from MEMORY) require -- from MEMORY type_ok: collector_type = full_collector or collector_type = incremental_collector memory_statistics (memory_type: INTEGER_32): MEM_INFO -- Memory usage information for `memory_type' -- (from MEMORY) require -- from MEMORY type_ok: memory_type = total_memory or memory_type = eiffel_memory or memory_type = c_memory feature -- Comparison frozen deep_equal (some: ?ANY; other: like arg #1): BOOLEAN -- Are `some' and `other' either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY shallow_implies_deep: standard_equal (some, other) implies Result both_or_none_void: (some = Void) implies (Result = (other = Void)) same_type: (Result and (some /= Void)) implies (other /= Void and then some.same_type (other)) symmetric: Result implies deep_equal (other, some) frozen equal (some: ?ANY; other: like arg #1): BOOLEAN -- Are `some' and `other' either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.is_equal (other)) frozen is_deep_equal (other: EV_APPLICATION_I): BOOLEAN -- Are `Current' and `other' attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: EV_APPLICATION_I): BOOLEAN -- Is `other' attached to an object considered -- equal to current object? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other.is_equal (Current) consistent: standard_is_equal (other) implies Result frozen standard_equal (some: ?ANY; other: like arg #1): BOOLEAN -- Are `some' and `other' either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY definition: Result = (some = Void and other = Void) or else ((some /= Void and other /= Void) and then some.standard_is_equal (other)) frozen standard_is_equal (other: EV_APPLICATION_I): BOOLEAN -- Is `other' attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report assertion_violation: BOOLEAN -- Is last exception originally due to a violated -- assertion or non-decreasing variant? -- (from EXCEPTIONS) chunk_size: INTEGER_32 -- Minimal size of a memory chunk. The run-time always -- allocates a multiple of this size. -- If the environment variable EIF_MEMORY_CHUNK -- is defined, it is set to the closest reasonable -- value from it. -- (from MEMORY) class_name: ?STRING_8 -- Name of the class that includes the recipient -- of original form of last exception -- (from EXCEPTIONS) coalesce_period: INTEGER_32 -- Period of full coalesce (in number of collections) -- If the environment variable EIF_FULL_COALESCE_PERIOD -- is defined, it is set to the closest reasonable -- value from it. -- If null, no full coalescing is launched. -- (from MEMORY) collecting: BOOLEAN -- Is garbage collection enabled? -- (from MEMORY) collection_period: INTEGER_32 -- Period of full collection. -- If the environment variable EIF_FULL_COLLECTION_PERIOD -- is defined, it is set to the closest reasonable -- value from it. -- If null, no full collection is launched. -- (from MEMORY) conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of `other' (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void developer_exception_name: ?STRING_8 -- Name of last developer-raised exception -- (from EXCEPTIONS) require -- from EXCEPTIONS applicable: is_developer_exception exception: INTEGER_32 -- Code of last exception that occurred -- (from EXCEPTIONS) exception_trace: ?STRING_8 -- String representation of the exception trace -- (from EXCEPTIONS) focused_widget: EV_WIDGET -- Widget with keyboard focus generation_object_limit: INTEGER_32 -- Maximum size of object in generational scavenge zone. -- If the environment variable EIF_GS_LIMIT -- is defined, it is set to the closest reasonable -- value from it. -- (from MEMORY) is_destroyed: BOOLEAN -- Is `Current' no longer usable? -- (from EV_ANY_I) is_developer_exception: BOOLEAN -- Is the last exception originally due to -- a developer exception? -- (from EXCEPTIONS) is_developer_exception_of_name (name: STRING_8): BOOLEAN -- Is the last exception originally due to a developer -- exception of name `name'? -- (from EXCEPTIONS) is_signal: BOOLEAN -- Is last exception originally due to an external -- event (operating system signal)? -- (from EXCEPTIONS) is_system_exception: BOOLEAN -- Is last exception originally due to an -- external event (operating system error)? -- (from EXCEPTIONS) largest_coalesced_block: INTEGER_32 -- Size of largest coalesced block since last call to -- `largest_coalesced'; 0 if none. -- (from MEMORY) max_mem: INTEGER_32 -- Maximum amount of bytes the run-time can allocate. -- (from MEMORY) meaning (except: INTEGER_32): ?STRING_8 -- A message in English describing what `except' is -- (from EXCEPTIONS) memory_count_map: HASH_TABLE [INTEGER_32, INTEGER_32] -- Number of instances per dynamic type present in system. -- Same as memory_map except that no references on the objects themselves -- is kept. -- (from MEMORY) memory_map: HASH_TABLE [ARRAYED_LIST [ANY], INTEGER_32] -- Retrieves all object in system as a table indexed by dynamic type -- where elements are all instances of a given data type. -- (from MEMORY) memory_threshold: INTEGER_32 -- Minimum amount of bytes to be allocated before -- starting an automatic garbage collection. -- (from MEMORY) objects_instance_of (an_object: ANY): SPECIAL [ANY] -- Objects that have same dynamic type as `an_object'. -- (from MEMORY) original_class_name: ?STRING_8 -- Name of the class that includes the recipient -- of original form of last exception -- (from EXCEPTIONS) original_exception: INTEGER_32 -- Original code of last exception that triggered -- current exception -- (from EXCEPTIONS) original_recipient_name: ?STRING_8 -- Name of the routine whose execution was -- interrupted by original form of last exception -- (from EXCEPTIONS) original_tag_name: ?STRING_8 -- Assertion tag for original form of last -- assertion violation. -- (from EXCEPTIONS) recipient_name: ?STRING_8 -- Name of the routine whose execution was -- interrupted by last exception -- (from EXCEPTIONS) referers (an_object: ANY): SPECIAL [ANY] -- Objects that refer to `an_object'. -- (from MEMORY) same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of `other'? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) scavenge_zone_size: INTEGER_32 -- Size of generational scavenge zone. -- If the environment variable EIF_MEMORY_SCAVENGE -- is defined, it is set to the closest reasonable -- value from it. -- (from MEMORY) tag_name: ?STRING_8 -- Tag of last violated assertion clause -- (from EXCEPTIONS) tenure: INTEGER_32 -- Maximum age of object before being considered -- as old (old objects are not scanned during -- partial collection). -- If the environment variable EIF_TENURE_MAX -- is defined, it is set to the closest reasonable -- value from it. -- (from MEMORY) tooltip_delay: INTEGER_32 -- Time in milliseconds before tooltips pop up. feature -- Status setting allocate_compact -- Enter ``memory'' mode: will try to compact memory -- before requesting more from the operating system. -- (from MEMORY) allocate_fast -- Enter ``speed'' mode: will optimize speed of memory -- allocation rather than memory usage. -- (from MEMORY) allocate_tiny -- Enter ``tiny'' mode: will enter ``memory'' mode -- after having freed as much memory as possible. -- (from MEMORY) catch (code: INTEGER_32) -- Make sure that any exception of code `code' will be -- caught. This is the default. -- (from EXCEPTIONS) collection_off -- Disable garbage collection. -- (from MEMORY) collection_on -- Enable garbage collection. -- (from MEMORY) die (code: INTEGER_32) -- Terminate execution with exit status `code', -- without triggering an exception. -- (from EXCEPTIONS) disable_time_accounting -- Disable GC time accounting (default). -- (from MEMORY) enable_time_accounting -- Enable GC time accouting, accessible in gc_statistics. -- (from MEMORY) execute_without_collection (a_action: PROCEDURE [ANY, TUPLE]) -- Execute `a_action' with the garbage collector disabled. -- If `a_action' modifies the status of collecting, we restore -- it no matter what at the end. -- (from MEMORY) require -- from MEMORY a_action_not_void: a_action /= Void ensure -- from MEMORY collection_status_preserved: collecting = old collecting ignore (code: INTEGER_32) -- Make sure that any exception of code `code' will be -- ignored. This is not the default. -- (from EXCEPTIONS) message_on_failure -- Print an exception history table -- in case of failure. -- This is the default. -- (from EXCEPTIONS) no_message_on_failure -- Do not print an exception history table -- in case of failure. -- (from EXCEPTIONS) raise (name: STRING_8) -- Raise a developer exception of name `name'. -- (from EXCEPTIONS) raise_retrieval_exception (name: STRING_8) -- Raise a retrieval exception of name `name'. -- (from EXCEPTIONS) set_coalesce_period (value: INTEGER_32) -- Set coalesce_period. Every `value' collection, -- the Garbage Collector will coalesce -- the whole memory. -- (from MEMORY) require -- from MEMORY positive_value: value >= 0 set_collection_period (value: INTEGER_32) -- Set collection_period. Every `value' collection, -- the Garbage collector will perform a collection -- on the whole memory (full collection), otherwise -- a simple partial collection is done. -- (from MEMORY) require -- from MEMORY positive_value: value >= 0 set_max_mem (value: INTEGER_32) -- Set the maximum amount of memory the run-time can allocate. -- (from MEMORY) require -- from MEMORY positive_value: value > 0 set_memory_threshold (value: INTEGER_32) -- Set a new memory_threshold in bytes. Whenever the memory -- allocated for Eiffel reaches this value, an automatic -- collection is performed. -- (from MEMORY) require -- from MEMORY positive_value: value > 0 set_tooltip_delay (a_delay: INTEGER_32) -- Set tooltip_delay to `a_delay'. require a_delay_non_negative: a_delay >= 0 ensure assigned: tooltip_delay = a_delay feature -- Removal collect -- Force a partial collection cycle if garbage -- collection is enabled; do nothing otherwise. -- (from MEMORY) dispose -- Action to be executed just before garbage collection -- reclaims an object. -- Default version does nothing; redefine in descendants -- to perform specific dispose actions. Those actions -- should only take care of freeing external resources; -- they should not perform remote calls on other objects -- since these may also be dead and reclaimed. -- (from MEMORY) free (object: ANY) -- Free `object', by-passing garbage collection. -- Erratic behavior will result if the object is still -- referenced. -- (from MEMORY) full_coalesce -- Coalesce the whole memory: merge adjacent free -- blocks to reduce fragmentation. Useful, when -- a lot of memory is allocated with garbage collector off. -- (from MEMORY) full_collect -- Force a full collection cycle if garbage -- collection is enabled; do nothing otherwise. -- (from MEMORY) mem_free (addr: POINTER) -- Free memory of object at `addr'. -- (Preferred interface is free.) -- (from MEMORY) feature -- Duplication copy (other: EV_APPLICATION_I) -- Update current object using fields of object attached -- to `other', so as to yield equal objects. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: is_equal (other) frozen deep_copy (other: EV_APPLICATION_I) -- Effect equivalent to that of: -- copy (`other' . deep_twin) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: EV_APPLICATION_I -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: EV_APPLICATION_I) -- Copy every field of `other' onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: EV_APPLICATION_I -- New object field-by-field identical to `other'. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) frozen twin: EV_APPLICATION_I -- New object equal to `Current' -- twin calls copy; to change copying/twining semantics, redefine copy. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result.is_equal (Current) feature -- Basic operations frozen default: ?EV_APPLICATION_I -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type `POINTER' -- (Avoid the need to write `p'.default for -- some `p' of type `POINTER'.) -- (from ANY) default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) feature -- Implementation call_post_launch_actions -- Call the post launch actions. exception_dialog: EV_DIALOG -- Dialog used for showing uncaught exceptions. interface: EV_APPLICATION -- Provides a common user interface to platform dependent -- functionality implemented by `Current' new_exception: EXCEPTION -- New exception object representating the last exception caught in Current ensure new_exception_not_void: Result /= Void on_exception_action (an_exception: EXCEPTION) -- Call exception actions. require an_exception_not_void: an_exception /= Void show_exception_dialog: BOOLEAN is True -- Should the exception dialog be shown by default? uncaught_exception_actions_called: BOOLEAN -- Are the `uncaught_exceptions_actions' currently being called? -- This is used to prevent infinite looping should an exception be raised as part of calling uncaught_exception_actions. feature pointer_motion_actions: EV_LITE_ACTION_SEQUENCE [TUPLE [EV_WIDGET, INTEGER_32, INTEGER_32]] -- Actions to be performed when screen pointer moves. -- (from EV_APPLICATION_ACTION_SEQUENCES_I) ensure -- from EV_APPLICATION_ACTION_SEQUENCES_I not_void: Result /= Void feature -- Basic operation add_idle_action (a_idle_action: PROCEDURE [ANY, TUPLE]) -- Extend idle_actions with `a_idle_action'. -- Thread safe require a_idle_action_not_void: a_idle_action /= Void display_help_for_widget (a_widget: EV_WIDGET) -- Display contextual help for `a_widget', if any. require a_widget_not_void: a_widget /= Void enable_contextual_help -- Change mouse cursor to help cursor -- Capture mouse input -- Send help context of widget under mouse cursor when left mouse button is pressed to help engine. -- Cancel contextual help mode when right mouse button is pressed. lock -- Lock the Mutex. process_events -- Process any pending events. process_events_until_stopped -- Process all events until 'stop_processing' is called. process_graphical_events -- Process any pending paint events. -- Pass control to the GUI toolkit so that it can -- handle any paint events that may be in its queue. remove_idle_action (a_idle_action: PROCEDURE [ANY, TUPLE]) -- Remove `a_idle_action' from idle_actions -- Thread safe require a_idle_action_not_void: a_idle_action /= Void sleep (msec: INTEGER_32) -- Wait for `msec' milliseconds and return. require msec_non_negative: msec >= 0 stop_processing -- Exit process_events_until_stopped. try_lock: BOOLEAN -- Try to see if we can lock, False means no lock could be attained