annotate src/syswindows.h @ 1204:e22b0213b713

[xemacs-hg @ 2003-01-12 11:07:58 by michaels] modules/ChangeLog: 2002-12-16 Ben Wing <ben@xemacs.org> * postgresql/postgresql.c: remove ifdef USE_KKCC. src/ChangeLog: 2003-01-08 Mike Sperber <mike@xemacs.org> * console.h (CDFW_CONSOLE): Don't lead to a crash if we're dealing with a dead window/frame/device/console. 2002-12-20 Mike Sperber <mike@xemacs.org> * ui-gtk.c: Fix typo from Ben's patch: emacs_ffi_data is a typedef, not a struct. emacs_gtk_object_data is a typedef, not a struct. * gtk-glue.c (gdk_event_to_emacs_event): Fix typos from Ben's patch: le -> emacs_event + rearrange the code. * event-gtk.c (gtk_event_to_emacs_event): Fix typos from Ben's patch: ..._UNDERLYING_GDK_EVENT -> ..._GDK_EVENT, ev -> key_event. * device-gtk.c: Fix typo from Ben's patch: x_keysym_map_hash_table -> x_keysym_map_hashtable. 2002-12-19 Mike Sperber <mike@xemacs.org> * menubar-x.c (set_frame_menubar): Initialize protect_me field of popup_data. 2002-12-16 Ben Wing <ben@xemacs.org> Major cleanup of KKCC, etc. KKCC, pdump-related: -- descriptions are written for all objects. this required some changes in the format of some objects, e.g. extents, popup-data, coding system, lstream, lcrecord-list. -- KKCC now handles weakness in markers, hash tables, elsewhere correctly (formerly, you'd eventually get a stack overflow due to endlessly expanding markers). -- textual changes: lrecord_description -> memory_description, struct_description -> sized_memory_description. -- extensive comment describing descriptions and pdump. -- redo XD_UNION so it works inline and change its format to provide sufficient info for pdump. implement XD_UNION in pdump. also add XD_UNION_DYNAMIC_SIZE, which works like XD_UNION except for when auto-computing structure sizes. -- add support for XD_INDIRECT in description offsets (used by extents). -- add support for "description maps", allowing for indirect descriptions that are retrieved from an object at run-time. this generalizes XD_CODING_SYSTEM_END, XD_SPECIFIER_END, etc., which have now been eliminated. -- add a fifth field "flags" to memory_description, to support flags that can be specified for this particular line. Currently defined flags are XD_FLAG_NO_KKCC (KKCC should ignore this entry; useful for the weakness above in markers, etc.), XD_FLAG_NO_PDUMP (pdump should ignore this entry), XD_FLAG_UNION_DEFAULT_ENTRY (in union maps, this specifies a "default" entry for all remaining values), and XD_FLAG_FREE_LISP_OBJECT (for use with lcrecord-lists). -- clean up the kkcc-itis in events, so that the differences between event data as separate objects and as a union are now minimized to a small number of places. with the new XD_UNION, we no longer need event data as separate objects, so this code is no longer ifdef USE_KKCC, but instead ifdef EVENT_DATA_AS_OBJECTS, not used by default. make sure that we explicitly free the separate event data objects when no longer in use, to maintain the invariant the event processing causes no consing. -- also remove other USE_KKCC ifdefs when not necessary. -- allow for KKCC compilation under MS Windows. -- fix README.kkcc. -- dump_add_root_object -> dump_add_root_lisp_object. -- implement dump_add_root_block and use this to handle dump_add_opaque. -- factor out some code duplicated in kkcc and pdump. Other allocation/object-related: -- change various *slots.h so MARKED_SLOT() call no longer includes semicolon. -- free_marker() takes a Lisp_Object not a direct pointer. -- make bit vectors lcrecords, like vectors, and eliminate code that essentially duplicated the lcrecord handling. -- additional asserts in FREE_FIXED_TYPE, formerly duplicated in the various callers of this. -- all lcrecord allocation functions now zero out the returned lcrecords. unnecessary calls to zero_lcrecord removed. add long comment describing these functions. -- extract out process and coding system slots, like for buffers, frames, etc. -- lcrecords now set the type of items sitting on the free list to lcrecord_type_free. -- changes to the way that gap arrays are allocated, for kkcc's benefit -- now, one single memory block with a stretchy array on the end, instead of a separate block holding the array. Error-checking-related: -- now can compile with C++ under MS Windows. clean up compile errors discovered that way. (a few were real problems) -- add C++ error-checking code to verify problems with mismatched GCPRO/UNGCPRO. (there were a few in the kkcc code.) add long comment about how to catch insufficient GCPRO (yes, it's possible using C++). -- add debug_p4(), a simple object printer, when debug_print() doesn't work. -- add dp() and db() as short synonyms of debug_print(), debug_backtrace(). -- `print' tries EXTREMELY hard to avoid core dumping when printing when crashing or from debug_print(), and tries as hard as it reasonably can in other situations. -- Correct the message output upon crashing to be more up-to-date. Event-related: -- document event-matches-key-specifier-p better. -- generalize the dispatch queues formerly duplicated in the various event implementations. add event methods to drain pending events. generalize and clean up QUIT handling, removing event-specific quit processing. allow arbitrary keystrokes, not just ASCII, to be the QUIT char. among other things, this should fix some longstanding bugs in X quit handling. long comment describing the various event queues. -- implement delaying of XFlush() if there are pending expose events. SOMEONE PLEASE TRY THIS OUT. -- Fix `xemacs -batch -l dunnet' under Cygwin. Try to fix under MS Windows but not quite there yet. Other: -- class -> class_ and no more C++ games with this item. new -> new_ in the lwlib code, so far not elsewhere. -- use `struct htentry' not `struct hentry' in elhash.c to avoid debugger confusion with hash.c. -- new macros ALIST_LOOP_3, ALIST_LOOP_4. * README.kkcc: * alloc.c: * alloc.c (deadbeef_memory): * alloc.c (allocate_lisp_storage): * alloc.c (copy_lisp_object): * alloc.c (ALLOCATE_FIXED_TYPE_1): * alloc.c (FREE_FIXED_TYPE): * alloc.c (make_vector_internal): * alloc.c (make_bit_vector_internal): * alloc.c (make_key_data): * alloc.c (make_button_data): * alloc.c (make_motion_data): * alloc.c (make_process_data): * alloc.c (make_timeout_data): * alloc.c (make_magic_data): * alloc.c (make_magic_eval_data): * alloc.c (make_eval_data): * alloc.c (make_misc_user_data): * alloc.c (struct string_chars_block): * alloc.c (mark_lcrecord_list): * alloc.c (make_lcrecord_list): * alloc.c (alloc_managed_lcrecord): * alloc.c (free_managed_lcrecord): * alloc.c (alloc_automanaged_lcrecord): * alloc.c (staticpro_1): * alloc.c (staticpro): * alloc.c (lispdesc_indirect_count_1): * alloc.c (lispdesc_indirect_description_1): * alloc.c (lispdesc_one_description_line_size): * alloc.c (lispdesc_structure_size): * alloc.c (mark_object_maybe_checking_free): * alloc.c (mark_with_description): * alloc.c (mark_struct_contents): * alloc.c (mark_object): * alloc.c (tick_lcrecord_stats): * alloc.c (free_cons): * alloc.c (free_key_data): * alloc.c (free_button_data): * alloc.c (free_motion_data): * alloc.c (free_process_data): * alloc.c (free_timeout_data): * alloc.c (free_magic_data): * alloc.c (free_magic_eval_data): * alloc.c (free_eval_data): * alloc.c (free_misc_user_data): * alloc.c (free_marker): * alloc.c (compact_string_chars): * alloc.c (gc_sweep): * alloc.c (garbage_collect_1): * alloc.c (Fgarbage_collect): * alloc.c (common_init_alloc_early): * alloc.c (init_alloc_early): * alloc.c (init_alloc_once_early): * buffer.c: * buffer.c (mark_buffer): * buffer.c (MARKED_SLOT): * buffer.c (cleanup_buffer_undo_lists): * buffer.c (Fget_file_buffer): * buffer.h (MARKED_SLOT): * bufslots.h: * bytecode.c: * callint.c: * casetab.c: * chartab.c: * chartab.c (symbol_to_char_table_type): * cmdloop.c: * cmdloop.c (Fcommand_loop_1): * config.h.in (new): * conslots.h: * console-gtk-impl.h (struct gtk_frame): * console-impl.h: * console-impl.h (struct console): * console-impl.h (MARKED_SLOT): * console-impl.h (CONSOLE_QUIT_EVENT): * console-msw-impl.h (XM_BUMPQUEUE): * console-msw.c (write_string_to_mswindows_debugging_output): * console-msw.h: * console-stream-impl.h: * console-stream-impl.h (struct stream_console): * console-stream.c: * console-stream.c (stream_init_console): * console-stream.h: * console-tty.c: * console-tty.h: * console-x.h: * console.c: * console.c (mark_console): * console.c (MARKED_SLOT): * console.c (allocate_console): * console.c (get_console_variant): * console.c (create_console): * console.c (delete_console_internal): * console.c (Fset_input_mode): * console.c (Fcurrent_input_mode): * console.c (common_init_complex_vars_of_console): * console.h: * console.h (console_variant): * console.h (device_metrics): * data.c: * data.c (Faref): * data.c (Faset): * data.c (decode_weak_list_type): * database.c: * debug.c (xemacs_debug_loop): * debug.c (FROB): * debug.c (Fadd_debug_class_to_check): * debug.c (Fdelete_debug_class_to_check): * debug.c (Fset_debug_classes_to_check): * debug.c (Fset_debug_class_types_to_check): * debug.c (Fdebug_types_being_checked): * debug.h (DASSERT): * device-gtk.c: * device-impl.h (struct device): * device-impl.h (MARKED_SLOT): * device-msw.c: * device-x.c: * device-x.c (x_init_device_class): * device-x.c (x_comp_visual_info): * device-x.c (x_try_best_visual_class): * device-x.c (x_init_device): * device-x.c (construct_name_list): * device-x.c (x_get_resource_prefix): * device-x.c (Fx_get_resource): * device-x.c (Fx_display_visual_class): * device.c: * device.c (MARKED_SLOT): * device.c (allocate_device): * device.c (Fmake_device): * device.c (delete_device_internal): * device.c (Fset_device_class): * device.h: * devslots.h: * devslots.h (MARKED_SLOT): * dialog-msw.c: * dired-msw.c (mswindows_ls_sort_fcn): * dired-msw.c (mswindows_get_files): * dired-msw.c (mswindows_format_file): * doprnt.c (parse_doprnt_spec): * dumper.c: * dumper.c (struct): * dumper.c (dump_add_root_block): * dumper.c (dump_add_root_struct_ptr): * dumper.c (dump_add_root_lisp_object): * dumper.c (pdump_struct_list_elt): * dumper.c (pdump_get_entry_list): * dumper.c (pdump_backtrace): * dumper.c (pdump_bump_depth): * dumper.c (pdump_register_sub): * dumper.c (pdump_register_object): * dumper.c (pdump_register_struct_contents): * dumper.c (pdump_register_struct): * dumper.c (pdump_store_new_pointer_offsets): * dumper.c (pdump_dump_data): * dumper.c (pdump_reloc_one): * dumper.c (pdump_allocate_offset): * dumper.c (pdump_scan_by_alignment): * dumper.c (pdump_dump_root_blocks): * dumper.c (pdump_dump_rtables): * dumper.c (pdump_dump_root_lisp_objects): * dumper.c (pdump): * dumper.c (pdump_load_finish): * dumper.c (pdump_file_get): * dumper.c (pdump_resource_get): * dumper.c (pdump_load): * editfns.c (save_excursion_restore): * editfns.c (user_login_name): * editfns.c (save_restriction_restore): * elhash.c: * elhash.c (htentry): * elhash.c (struct Lisp_Hash_Table): * elhash.c (HTENTRY_CLEAR_P): * elhash.c (LINEAR_PROBING_LOOP): * elhash.c (check_hash_table_invariants): * elhash.c (mark_hash_table): * elhash.c (hash_table_equal): * elhash.c (print_hash_table_data): * elhash.c (free_hentries): * elhash.c (make_general_lisp_hash_table): * elhash.c (decode_hash_table_weakness): * elhash.c (decode_hash_table_test): * elhash.c (Fcopy_hash_table): * elhash.c (resize_hash_table): * elhash.c (pdump_reorganize_hash_table): * elhash.c (find_htentry): * elhash.c (Fgethash): * elhash.c (Fputhash): * elhash.c (remhash_1): * elhash.c (Fremhash): * elhash.c (Fclrhash): * elhash.c (copy_compress_hentries): * elhash.c (elisp_maphash_unsafe): * elhash.c (finish_marking_weak_hash_tables): * elhash.c (prune_weak_hash_tables): * elhash.h: * emacs.c: * emacs.c (main_1): * emacs.c (main): * emacs.c (shut_down_emacs): * emodules.h (dump_add_root_lisp_object): * eval.c: * eval.c (unwind_to_catch): * eval.c (maybe_signal_error_1): * eval.c (maybe_signal_continuable_error_1): * eval.c (maybe_signal_error): * eval.c (maybe_signal_continuable_error): * eval.c (maybe_signal_error_2): * eval.c (maybe_signal_continuable_error_2): * eval.c (maybe_signal_ferror): * eval.c (maybe_signal_continuable_ferror): * eval.c (maybe_signal_ferror_with_frob): * eval.c (maybe_signal_continuable_ferror_with_frob): * eval.c (maybe_syntax_error): * eval.c (maybe_sferror): * eval.c (maybe_invalid_argument): * eval.c (maybe_invalid_constant): * eval.c (maybe_invalid_operation): * eval.c (maybe_invalid_change): * eval.c (maybe_invalid_state): * eval.c (Feval): * eval.c (call_trapping_problems): * eval.c (call_with_suspended_errors): * eval.c (warn_when_safe_lispobj): * eval.c (warn_when_safe): * eval.c (vars_of_eval): * event-Xt.c: * event-Xt.c (maybe_define_x_key_as_self_inserting_character): * event-Xt.c (x_to_emacs_keysym): * event-Xt.c (x_event_to_emacs_event): * event-Xt.c (emacs_Xt_enqueue_focus_event): * event-Xt.c (emacs_Xt_format_magic_event): * event-Xt.c (emacs_Xt_compare_magic_event): * event-Xt.c (emacs_Xt_hash_magic_event): * event-Xt.c (emacs_Xt_handle_magic_event): * event-Xt.c (Xt_timeout_to_emacs_event): * event-Xt.c (Xt_process_to_emacs_event): * event-Xt.c (signal_special_Xt_user_event): * event-Xt.c (emacs_Xt_next_event): * event-Xt.c (emacs_Xt_event_handler): * event-Xt.c (emacs_Xt_drain_queue): * event-Xt.c (emacs_Xt_event_pending_p): * event-Xt.c (check_if_pending_expose_event): * event-Xt.c (reinit_vars_of_event_Xt): * event-Xt.c (vars_of_event_Xt): * event-gtk.c: * event-gtk.c (IS_MODIFIER_KEY): * event-gtk.c (emacs_gtk_format_magic_event): * event-gtk.c (emacs_gtk_compare_magic_event): * event-gtk.c (emacs_gtk_hash_magic_event): * event-gtk.c (emacs_gtk_handle_magic_event): * event-gtk.c (gtk_to_emacs_keysym): * event-gtk.c (gtk_timeout_to_emacs_event): * event-gtk.c (gtk_process_to_emacs_event): * event-gtk.c (dragndrop_data_received): * event-gtk.c (signal_special_gtk_user_event): * event-gtk.c (emacs_gtk_next_event): * event-gtk.c (gtk_event_to_emacs_event): * event-gtk.c (generic_event_handler): * event-gtk.c (emacs_shell_event_handler): * event-gtk.c (emacs_gtk_drain_queue): * event-gtk.c (emacs_gtk_event_pending_p): * event-gtk.c (reinit_vars_of_event_gtk): * event-gtk.c (vars_of_event_gtk): * event-msw.c: * event-msw.c (struct winsock_stream): * event-msw.c (winsock_reader): * event-msw.c (winsock_writer): * event-msw.c (mswindows_enqueue_dispatch_event): * event-msw.c (mswindows_enqueue_misc_user_event): * event-msw.c (mswindows_enqueue_magic_event): * event-msw.c (mswindows_enqueue_process_event): * event-msw.c (mswindows_enqueue_mouse_button_event): * event-msw.c (mswindows_enqueue_keypress_event): * event-msw.c (mswindows_dequeue_dispatch_event): * event-msw.c (emacs_mswindows_drain_queue): * event-msw.c (mswindows_need_event_in_modal_loop): * event-msw.c (mswindows_need_event): * event-msw.c (mswindows_wm_timer_callback): * event-msw.c (dde_eval_string): * event-msw.c (Fdde_alloc_advise_item): * event-msw.c (mswindows_dde_callback): * event-msw.c (mswindows_wnd_proc): * event-msw.c (remove_timeout_mapper): * event-msw.c (emacs_mswindows_remove_timeout): * event-msw.c (emacs_mswindows_event_pending_p): * event-msw.c (emacs_mswindows_format_magic_event): * event-msw.c (emacs_mswindows_compare_magic_event): * event-msw.c (emacs_mswindows_hash_magic_event): * event-msw.c (emacs_mswindows_handle_magic_event): * event-msw.c (emacs_mswindows_select_console): * event-msw.c (emacs_mswindows_unselect_console): * event-msw.c (reinit_vars_of_event_mswindows): * event-msw.c (vars_of_event_mswindows): * event-stream.c: * event-stream.c (mark_command_builder): * event-stream.c (reset_command_builder_event_chain): * event-stream.c (allocate_command_builder): * event-stream.c (copy_command_builder): * event-stream.c (command_builder_append_event): * event-stream.c (event_stream_event_pending_p): * event-stream.c (event_stream_force_event_pending): * event-stream.c (maybe_read_quit_event): * event-stream.c (event_stream_drain_queue): * event-stream.c (remove_quit_p_event): * event-stream.c (event_stream_quit_p): * event-stream.c (echo_key_event): * event-stream.c (maybe_kbd_translate): * event-stream.c (execute_help_form): * event-stream.c (event_stream_generate_wakeup): * event-stream.c (enqueue_dispatch_event): * event-stream.c (enqueue_magic_eval_event): * event-stream.c (Fenqueue_eval_event): * event-stream.c (enqueue_misc_user_event): * event-stream.c (enqueue_misc_user_event_pos): * event-stream.c (next_event_internal): * event-stream.c (Fnext_event): * event-stream.c (Faccept_process_output): * event-stream.c (execute_internal_event): * event-stream.c (munge_keymap_translate): * event-stream.c (command_builder_find_leaf_no_mule_processing): * event-stream.c (command_builder_find_leaf): * event-stream.c (lookup_command_event): * event-stream.c (is_scrollbar_event): * event-stream.c (execute_command_event): * event-stream.c (Fdispatch_event): * event-stream.c (Fread_key_sequence): * event-stream.c (dribble_out_event): * event-stream.c (vars_of_event_stream): * event-tty.c (tty_timeout_to_emacs_event): * event-tty.c (emacs_tty_next_event): * event-tty.c (emacs_tty_drain_queue): * event-tty.c (reinit_vars_of_event_tty): * event-unixoid.c: * event-unixoid.c (find_tty_or_stream_console_from_fd): * event-unixoid.c (read_event_from_tty_or_stream_desc): * event-unixoid.c (drain_tty_devices): * event-unixoid.c (poll_fds_for_input): * events.c: * events.c (deinitialize_event): * events.c (zero_event): * events.c (mark_event): * events.c (print_event_1): * events.c (print_event): * events.c (event_equal): * events.c (event_hash): * events.c (Fmake_event): * events.c (Fdeallocate_event): * events.c (Fcopy_event): * events.c (map_event_chain_remove): * events.c (character_to_event): * events.c (event_to_character): * events.c (Fevent_to_character): * events.c (format_event_object): * events.c (upshift_event): * events.c (downshift_event): * events.c (event_upshifted_p): * events.c (Fevent_live_p): * events.c (Fevent_type): * events.c (Fevent_timestamp): * events.c (CHECK_EVENT_TYPE): * events.c (CHECK_EVENT_TYPE2): * events.c (CHECK_EVENT_TYPE3): * events.c (Fevent_key): * events.c (Fevent_button): * events.c (Fevent_modifier_bits): * events.c (event_x_y_pixel_internal): * events.c (event_pixel_translation): * events.c (Fevent_process): * events.c (Fevent_function): * events.c (Fevent_object): * events.c (Fevent_properties): * events.c (syms_of_events): * events.c (vars_of_events): * events.h: * events.h (struct event_stream): * events.h (struct Lisp_Key_Data): * events.h (KEY_DATA_KEYSYM): * events.h (EVENT_KEY_KEYSYM): * events.h (struct Lisp_Button_Data): * events.h (EVENT_BUTTON_BUTTON): * events.h (struct Lisp_Motion_Data): * events.h (EVENT_MOTION_X): * events.h (struct Lisp_Process_Data): * events.h (EVENT_PROCESS_PROCESS): * events.h (struct Lisp_Timeout_Data): * events.h (EVENT_TIMEOUT_INTERVAL_ID): * events.h (struct Lisp_Eval_Data): * events.h (EVENT_EVAL_FUNCTION): * events.h (struct Lisp_Misc_User_Data): * events.h (EVENT_MISC_USER_FUNCTION): * events.h (struct Lisp_Magic_Eval_Data): * events.h (EVENT_MAGIC_EVAL_INTERNAL_FUNCTION): * events.h (struct Lisp_Magic_Data): * events.h (EVENT_MAGIC_UNDERLYING): * events.h (EVENT_MAGIC_GDK_EVENT): * events.h (struct Lisp_Event): * events.h (XEVENT_CHANNEL): * events.h (SET_EVENT_TIMESTAMP_ZERO): * events.h (SET_EVENT_CHANNEL): * events.h (SET_EVENT_NEXT): * events.h (XSET_EVENT_TYPE): * events.h (struct command_builder): * extents.c: * extents.c (gap_array_adjust_markers): * extents.c (gap_array_recompute_derived_values): * extents.c (gap_array_move_gap): * extents.c (gap_array_make_gap): * extents.c (gap_array_insert_els): * extents.c (gap_array_delete_els): * extents.c (gap_array_make_marker): * extents.c (gap_array_delete_marker): * extents.c (gap_array_move_marker): * extents.c (make_gap_array): * extents.c (free_gap_array): * extents.c (extent_list_num_els): * extents.c (extent_list_insert): * extents.c (mark_extent_auxiliary): * extents.c (allocate_extent_auxiliary): * extents.c (decode_extent_at_flag): * extents.c (verify_extent_mapper): * extents.c (symbol_to_glyph_layout): * extents.c (syms_of_extents): * faces.c: * file-coding.c: * file-coding.c (struct_detector_category_description =): * file-coding.c (detector_category_dynarr_description_1): * file-coding.c (struct_detector_description =): * file-coding.c (detector_dynarr_description_1): * file-coding.c (MARKED_SLOT): * file-coding.c (mark_coding_system): * file-coding.c (coding_system_extra_description_map): * file-coding.c (coding_system_description): * file-coding.c (allocate_coding_system): * file-coding.c (symbol_to_eol_type): * file-coding.c (Fcoding_system_aliasee): * file-coding.c (set_coding_stream_coding_system): * file-coding.c (struct convert_eol_coding_system): * file-coding.c (struct undecided_coding_system): * file-coding.c (undecided_mark_coding_stream): * file-coding.c (coding_category_symbol_to_id): * file-coding.c (struct gzip_coding_system): * file-coding.c (coding_system_type_create): * file-coding.h: * file-coding.h (struct Lisp_Coding_System): * file-coding.h (CODING_SYSTEM_SLOT_DECLARATION): * file-coding.h (coding_system_variant): * file-coding.h (struct coding_system_methods): * file-coding.h (DEFINE_CODING_SYSTEM_TYPE_WITH_DATA): * file-coding.h (INITIALIZE_CODING_SYSTEM_TYPE_WITH_DATA): * file-coding.h (struct coding_stream): * fileio.c (Fsubstitute_in_file_name): * floatfns.c: * fns.c: * fns.c (base64_encode_1): * frame-gtk.c: * frame-gtk.c (Fgtk_start_drag_internal): * frame-impl.h (struct frame): * frame-impl.h (MARKED_SLOT): * frame-msw.c: * frame-x.c: * frame-x.c (Fcde_start_drag_internal): * frame-x.c (Foffix_start_drag_internal): * frame.c: * frame.c (MARKED_SLOT): * frame.c (allocate_frame_core): * frame.c (delete_frame_internal): * frame.c (Fmouse_position_as_motion_event): * frameslots.h: * frameslots.h (MARKED_SLOT_ARRAY): * free-hook.c: * glyphs-msw.c (mswindows_widget_instantiate): * glyphs-x.c: * glyphs-x.c (convert_EImage_to_XImage): * glyphs.c: * glyphs.c (process_image_string_instantiator): * glyphs.c (mark_image_instance): * glyphs.c (allocate_image_instance): * glyphs.c (unmap_subwindow): * glyphs.c (map_subwindow): * glyphs.c (syms_of_glyphs): * glyphs.c (specifier_type_create_image): * glyphs.h: * glyphs.h (struct text_image_instance): * glyphs.h (struct Lisp_Image_Instance): * gmalloc.c: * gmalloc.c ("C"): * gpmevent.c (Freceive_gpm_event): * gpmevent.c (gpm_next_event_cb): * gpmevent.c (vars_of_gpmevent): * gtk-glue.c (gdk_event_to_emacs_event): * gtk-xemacs.c (gtk_xemacs_class_init): * gui-msw.c: * gui-msw.c (mswindows_handle_gui_wm_command): * gui-msw.c (mswindows_translate_menu_or_dialog_item): * gui-x.c: * gui-x.c (mark_popup_data): * gui-x.c (snarf_widget_value_mapper): * gui-x.c (gcpro_popup_callbacks): * gui-x.c (ungcpro_popup_callbacks): * gui-x.c (free_popup_widget_value_tree): * gui-x.c (popup_selection_callback): * gui-x.h: * gui-x.h (struct popup_data): * gui.c: * gui.c (allocate_gui_item): * gutter.c (decode_gutter_position): * hash.c (NULL_ENTRY): * indent.c (vmotion_1): * indent.c (vmotion_pixels): * input-method-motif.c (res): * input-method-xlib.c (IMInstantiateCallback): * input-method-xlib.c (XIM_init_device): * input-method-xlib.c (res): * intl-encap-win32.c: * intl-encap-win32.c (qxeSHGetDataFromIDList): * intl-win32.c: * intl-win32.c (mswindows_multibyte_cp_type): * intl-win32.c (struct mswindows_multibyte_coding_system): * keymap.c: * keymap.c (make_key_description): * keymap.c (keymap_store): * keymap.c (get_keyelt): * keymap.c (keymap_lookup_1): * keymap.c (define_key_parser): * keymap.c (key_desc_list_to_event): * keymap.c (event_matches_key_specifier_p): * keymap.c (meta_prefix_char_p): * keymap.c (ensure_meta_prefix_char_keymapp): * keymap.c (Fdefine_key): * keymap.c (struct raw_lookup_key_mapper_closure): * keymap.c (raw_lookup_key): * keymap.c (raw_lookup_key_mapper): * keymap.c (lookup_keys): * keymap.c (lookup_events): * keymap.c (Flookup_key): * keymap.c (struct map_keymap_unsorted_closure): * keymap.c (map_keymap_unsorted_mapper): * keymap.c (map_keymap_sorted): * keymap.c (map_keymap_mapper): * keymap.c (map_keymap): * keymap.c (accessible_keymaps_mapper_1): * keymap.c (Faccessible_keymaps): * keymap.c (Fsingle_key_description): * keymap.c (raw_keys_to_keys): * keymap.c (format_raw_keys): * keymap.c (where_is_recursive_mapper): * keymap.c (where_is_internal): * keymap.c (describe_map_mapper_shadow_search): * keymap.c (keymap_lookup_inherited_mapper): * keymap.c (describe_map_mapper): * keymap.h (event_matches_key_specifier_p): * lisp.h: * lisp.h (this): * lisp.h (RETURN_NOT_REACHED): * lisp.h (struct Lisp_Vector): * lisp.h (struct Lisp_Bit_Vector): * lisp.h (UNGCPRO_1): * lisp.h (NUNGCPRO): * lisp.h (NNUNGCPRO): * lisp.h (DECLARE_INLINE_HEADER): * lrecord.h: * lrecord.h (struct lrecord_header): * lrecord.h (struct lcrecord_header): * lrecord.h (lrecord_type): * lrecord.h (struct lrecord_implementation): * lrecord.h (RECORD_DUMPABLE): * lrecord.h (memory_description_type): * lrecord.h (data_description_entry_flags): * lrecord.h (struct memory_description): * lrecord.h (struct sized_memory_description): * lrecord.h (XD_INDIRECT): * lrecord.h (XD_IS_INDIRECT): * lrecord.h (XD_DYNARR_DESC): * lrecord.h (DEFINE_BASIC_LRECORD_IMPLEMENTATION): * lrecord.h (MAKE_LRECORD_IMPLEMENTATION): * lrecord.h (MAKE_EXTERNAL_LRECORD_IMPLEMENTATION): * lrecord.h (alloc_lcrecord_type): * lstream.c: * lstream.c (Lstream_new): * lstream.c (lisp_buffer_marker): * lstream.h: * lstream.h (lstream_implementation): * lstream.h (DEFINE_LSTREAM_IMPLEMENTATION): * lstream.h (DEFINE_LSTREAM_IMPLEMENTATION_WITH_DATA): * marker.c: * marker.c (copy_marker_1): * mem-limits.h: * menubar-gtk.c: * menubar-gtk.c (gtk_popup_menu): * menubar-msw.c: * menubar-msw.c (mswindows_popup_menu): * menubar-x.c (make_dummy_xbutton_event): * menubar-x.c (command_builder_operate_menu_accelerator): * menubar-x.c (menu_accelerator_safe_compare): * menubar-x.c (menu_accelerator_safe_mod_compare): * mule-charset.c: * mule-charset.c (make_charset): * mule-charset.c (Fcharset_property): * mule-coding.c: * mule-coding.c (ccs_description_1): * mule-coding.c (ccs_description =): * mule-coding.c (ccsd_description_1): * mule-coding.c (ccsd_description =): * nt.c (getpwnam): * nt.c (init_mswindows_environment): * nt.c (get_cached_volume_information): * nt.c (mswindows_is_executable): * nt.c (read_unc_volume): * nt.c (mswindows_access): * nt.c (mswindows_link): * nt.c (mswindows_fstat): * nt.c (mswindows_stat): * nt.c (mswindows_executable_type): * nt.c (Fmswindows_short_file_name): * nt.c (Fmswindows_long_file_name): * objects-impl.h (struct Lisp_Color_Instance): * objects-impl.h (struct Lisp_Font_Instance): * objects-tty.c: * objects-x.c (allocate_nearest_color): * objects.c: * objects.c (Fmake_color_instance): * objects.c (Fmake_font_instance): * objects.c (font_instantiate): * opaque.c: * opaque.c (make_opaque): * opaque.c (make_opaque_ptr): * opaque.c (reinit_opaque_early): * opaque.c (init_opaque_once_early): * print.c: * print.c (printing_badness): * print.c (printing_major_badness): * print.c (print_internal): * print.c (debug_p4): * print.c (dp): * print.c (debug_backtrace): * process-nt.c (nt_create_process): * process-nt.c (get_internet_address): * process-unix.c: * process-unix.c (struct unix_process_data): * process-unix.c (get_internet_address): * process-unix.c (unix_alloc_process_data): * process-unix.c (unix_create_process): * process-unix.c (try_to_initialize_subtty): * process-unix.c (unix_kill_child_process): * process-unix.c (process_type_create_unix): * process.c: * process.c (mark_process): * process.c (MARKED_SLOT): * process.c (make_process_internal): * process.c (Fprocess_tty_name): * process.c (decode_signal): * process.h: * procimpl.h: * procimpl.h (struct process_methods): * procimpl.h (struct Lisp_Process): * rangetab.c: * realpath.c (readlink_and_correct_case): * redisplay-x.c (x_window_output_end): * redisplay-x.c (x_redraw_exposed_area): * redisplay-x.c (x_clear_frame): * redisplay.c: * redisplay.h: * redisplay.h (struct rune_dglyph): * redisplay.h (struct rune): * scrollbar.c: * scrollbar.c (create_scrollbar_instance): * specifier.c: * specifier.c (specifier_empty_extra_description_1): * specifier.c (make_specifier_internal): * specifier.c (decode_locale_type): * specifier.c (decode_how_to_add_specification): * specifier.h: * specifier.h (struct specifier_methods): * specifier.h (DEFINE_SPECIFIER_TYPE_WITH_DATA): * specifier.h (INITIALIZE_SPECIFIER_TYPE_WITH_DATA): * symbols.c: * symbols.c (Fsetplist): * symbols.c (default_value): * symbols.c (decode_magic_handler_type): * symbols.c (handler_type_from_function_symbol): * symbols.c (Fdefvaralias): * symbols.c (init_symbols_once_early): * symbols.c (reinit_symbols_early): * symsinit.h: * sysdep.c (sys_subshell): * sysdep.c (tty_init_sys_modes_on_device): * syswindows.h: * text.c (dfc_convert_to_external_format): * text.c (dfc_convert_to_internal_format): * text.c (reinit_eistring_early): * text.c (init_eistring_once_early): * text.c (reinit_vars_of_text): * text.h: * text.h (INC_IBYTEPTR_FMT): * text.h (DEC_IBYTEPTR_FMT): * toolbar.c: * toolbar.c (decode_toolbar_position): * tooltalk.c: * ui-gtk.c: * unexnt.c: * unexnt.c (_start): * unexnt.c (unexec): * unexnt.c (get_section_info): * unicode.c: * unicode.c (vars_of_unicode): * window.c: * window.c (allocate_window): * window.c (new_window_mirror): * window.c (update_mirror_internal): * winslots.h:
author michaels
date Sun, 12 Jan 2003 11:08:22 +0000
parents 184461bc8de4
children 579d37cb4395
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1 /* Copyright (C) 2000 Free Software Foundation, Inc.
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
2 Copyright (C) 2000, 2001, 2002 Ben Wing.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
3
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
4 This file is part of XEmacs.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
5
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
9 later version.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
10
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
14 for more details.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
15
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
20
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
21 /* Synched up with: Not in FSF. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
22
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
23 /* Authorship:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
24
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
25 Current primary author: Ben Wing <ben@xemacs.org>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
26
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
27 Created May 2000 by Andy Piper.
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
28 Windows-Mule stuff added by Ben Wing, 2000-2001.
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
29 September 2001 Ben Wing reorganized and included nt.h and ntheap.h into
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
30 this file; comments in those files say:
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
31 * Adapted for XEmacs by David Hobley <david@spook-le0.cia.com.au>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
32 * Sync'ed with Emacs 19.34.6 by Marc Paquette <marcpa@cam.org>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
33 (Note: Sync messages from Marc Paquette may indicate
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
34 incomplete synching, so beware.)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
35 (in ntheap.h only) Geoff Voelker (voelker@cs.washington.edu) 7-29-94
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
36
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
37 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
38
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
39 #ifndef INCLUDED_syswindows_h_
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
40 #define INCLUDED_syswindows_h_
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
41
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
42 /* There are two different general Windows-related include files in src.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
43
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
44 Uses are approximately:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
45
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
46 syswindows.h: Wrapper around <windows.h>, including missing defines as
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
47 necessary. Includes stuff needed on both Cygwin and native Windows,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
48 regardless of window system chosen. Includes definitions needed for
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
49 Unicode conversion/encapsulation, and other Mule-related stuff, plus
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
50 various other prototypes and Windows-specific, but not GUI-specific,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
51 stuff.
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
52
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
53 console-msw.h: Used on both Cygwin and native Windows, but only when
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
54 native window system (as opposed to X) chosen. Includes syswindows.h.
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
55 */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
56
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
57 /* See s/windowsnt.h for a description of what exactly the various
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
58 constants such as WIN32_NATIVE, HAVE_MS_WINDOWS, CYGWIN, and MINGW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
59 mean, and how they relate to each other. */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
60
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
61 /* ------------------------- Basic includes ------------------------- */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
62
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
63 #ifndef WIN32_LEAN_AND_MEAN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
64 #define WIN32_LEAN_AND_MEAN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
65 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
66
665
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
67 #if defined (CYGWIN) || defined (MINGW)
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
68 # define CYGWIN_HEADERS
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
69 # ifndef _WIN32_IE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
70 # define _WIN32_IE 0x0400
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
71 # endif
665
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
72
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
73 #ifdef __cplusplus
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
74 extern "C" {
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
75 #endif
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
76
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
77 /* Fucking GCC complains about "no previous prototype" for inline
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
78 functions. DUH! See DECLARE_INLINE_HEADER. */
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
79 extern __inline void *GetCurrentFiber (void);
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
80 extern __inline void *GetFiberData (void);
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
81
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
82 #ifdef __cplusplus
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
83 }
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
84 #endif
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
85
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
86 #endif
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
87
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
88 /* Defines for COM so it's usable in both C and C++. XECOMCALLn() calls a
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
89 method with the specified number of parameters. XECOMID() surrounds a
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
90 class or interface name when passed to CoCreateInstance, a
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
91 QueryInterface method, or the like. */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
92 #ifdef __cplusplus
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
93 #define XECOMCALL0(cl, meth) ((cl)->meth ())
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
94 #define XECOMCALL1(cl, meth, a1) ((cl)->meth (a1))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
95 #define XECOMCALL2(cl, meth, a1, a2) ((cl)->meth (a1, a2))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
96 #define XECOMCALL3(cl, meth, a1, a2, a3) ((cl)->meth (a1, a2, a3))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
97 #define XECOMCALL4(cl, meth, a1, a2, a3, a4) ((cl)->meth (a1, a2, a3, a4))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
98 #define XECOMID(id) (id)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
99 #else
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
100 #define XECOMCALL0(cl, meth) ((cl)->lpVtbl->meth (cl))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
101 #define XECOMCALL1(cl, meth, a1) ((cl)->lpVtbl->meth (cl, a1))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
102 #define XECOMCALL2(cl, meth, a1, a2) ((cl)->lpVtbl->meth (cl, a1, a2))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
103 #define XECOMCALL3(cl, meth, a1, a2, a3) ((cl)->lpVtbl->meth (cl, a1, a2, a3))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
104 #define XECOMCALL4(cl, meth, a1, a2, a3, a4) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
105 ((cl)->lpVtbl->meth (cl, a1, a2, a3, a4))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
106 #define XECOMID(id) (&(id))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
107 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
108
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
109 #define OEMRESOURCE /* Define OCR_ and friend constants */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
110 #include <windows.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
111
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
112 #if defined (WIN32_LEAN_AND_MEAN)
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
113 # ifdef HAVE_X_WINDOWS
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
114 /* Christ almighty. The problems you get when combining two large code bases,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
115 neither with any respect for namespace purity. */
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
116 # undef Status
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
117 # endif
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
118 # include <winspool.h>
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
119 # ifdef HAVE_X_WINDOWS
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
120 # define Status int
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
121 # endif
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
122 # include <mmsystem.h>
673
685b588e92d8 [xemacs-hg @ 2001-10-30 05:13:26 by andyp]
andyp
parents: 665
diff changeset
123 # include <shlobj.h>
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
124 # include <shellapi.h>
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
125 # include <ddeml.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
126 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
127
546
666d73d6ac56 [xemacs-hg @ 2001-05-20 01:17:07 by ben]
ben
parents: 531
diff changeset
128 #include <lmaccess.h> /* next three for NetUserEnum and friends */
531
0493e9f3c27f [xemacs-hg @ 2001-05-12 11:16:12 by ben]
ben
parents: 442
diff changeset
129 #include <lmapibuf.h>
0493e9f3c27f [xemacs-hg @ 2001-05-12 11:16:12 by ben]
ben
parents: 442
diff changeset
130 #include <lmerr.h>
546
666d73d6ac56 [xemacs-hg @ 2001-05-20 01:17:07 by ben]
ben
parents: 531
diff changeset
131 #include <lmcons.h> /* for UNLEN and possibly other constants */
531
0493e9f3c27f [xemacs-hg @ 2001-05-12 11:16:12 by ben]
ben
parents: 442
diff changeset
132
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
133 #include <cderr.h>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
134 #include <commdlg.h>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
135
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
136 #ifdef NEED_MSWINDOWS_COMMCTRL
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
137 #include <commctrl.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
138 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
139 #ifdef NEED_MSWINDOWS_OBJBASE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
140 #include <objbase.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
141 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
142 #ifdef NEED_MSWINDOWS_SHLOBJ
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
143 #include <shlobj.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
144 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
145
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
146 #include <zmouse.h> /* WHEEL_PAGESCROLL under Cygwin */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
147
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
148 #include <wchar.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
149
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
150 /* ------------------------- Cygwin header brokenness ---------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
151
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
152 #ifdef CYGWIN_HEADERS
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
153
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
154 /* Various brokennesses in various versions of Cygwin */
673
685b588e92d8 [xemacs-hg @ 2001-10-30 05:13:26 by andyp]
andyp
parents: 665
diff changeset
155
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
156 /* windows.h defines. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
157 #ifndef SPI_GETWHEELSCROLLLINES
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
158 #define SPI_GETWHEELSCROLLLINES 104
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
159 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
160
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
161 /* commctrl.h defines. */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
162 #ifndef TB_SETIMAGELIST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
163 #define TB_SETIMAGELIST (WM_USER + 48)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
164 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
165 #ifndef TB_GETIMAGELIST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
166 #define TB_GETIMAGELIST (WM_USER + 49)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
167 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
168 #ifndef TB_SETDISABLEDIMAGELIST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
169 #define TB_SETDISABLEDIMAGELIST (WM_USER + 54)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
170 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
171 #ifndef TB_GETDISABLEDIMAGELIST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
172 #define TB_GETDISABLEDIMAGELIST (WM_USER + 55)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
173 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
174 #ifndef TB_SETPADDING
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
175 #define TB_SETPADDING (WM_USER + 87)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
176 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
177 #ifndef TB_GETBUTTONINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
178 #define TB_GETBUTTONINFOA (WM_USER + 65)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
179 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
180 #ifndef TB_GETBUTTONINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
181 #define TB_GETBUTTONINFOW (WM_USER + 63)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
182 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
183 #ifndef TB_SETBUTTONINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
184 #define TB_SETBUTTONINFOA (WM_USER + 66)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
185 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
186 #ifndef TB_SETBUTTONINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
187 #define TB_SETBUTTONINFOW (WM_USER + 64)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
188 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
189 #ifndef TB_INSERTBUTTONA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
190 #define TB_INSERTBUTTONA (WM_USER + 21)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
191 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
192 #ifndef TB_INSERTBUTTONW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
193 #define TB_INSERTBUTTONW (WM_USER + 67)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
194 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
195 #ifndef TB_ADDBUTTONSA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
196 #define TB_ADDBUTTONSA (WM_USER + 20)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
197 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
198 #ifndef TB_ADDBUTTONSW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
199 #define TB_ADDBUTTONSW (WM_USER + 68)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
200 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
201 #ifndef LVM_SETBKIMAGEA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
202 #define LVM_SETBKIMAGEA (LVM_FIRST + 68)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
203 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
204 #ifndef LVM_SETBKIMAGEW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
205 #define LVM_SETBKIMAGEW (LVM_FIRST + 138)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
206 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
207 #ifndef LVM_GETBKIMAGEA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
208 #define LVM_GETBKIMAGEA (LVM_FIRST + 69)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
209 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
210 #ifndef LVM_GETBKIMAGEW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
211 #define LVM_GETBKIMAGEW (LVM_FIRST + 139)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
212 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
213 #ifndef WC_COMBOBOXEXW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
214 #define WC_COMBOBOXEXW L"ComboBoxEx32"
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
215 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
216 #ifndef CBEM_INSERTITEMA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
217 #define CBEM_INSERTITEMA (WM_USER + 1)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
218 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
219 #ifndef CBEM_INSERTITEMW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
220 #define CBEM_INSERTITEMW (WM_USER + 11)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
221 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
222 #ifndef CBEM_SETITEMA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
223 #define CBEM_SETITEMA (WM_USER + 5)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
224 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
225 #ifndef CBEM_SETITEMW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
226 #define CBEM_SETITEMW (WM_USER + 12)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
227 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
228 #ifndef CBEM_GETITEMA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
229 #define CBEM_GETITEMA (WM_USER + 4)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
230 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
231 #ifndef CBEM_GETITEMW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
232 #define CBEM_GETITEMW (WM_USER + 13)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
233 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
234 #ifndef HDN_GETDISPINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
235 #define HDN_GETDISPINFOA (HDN_FIRST - 9)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
236 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
237 #ifndef HDN_GETDISPINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
238 #define HDN_GETDISPINFOW (HDN_FIRST - 29)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
239 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
240 #ifndef TBN_GETDISPINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
241 #define TBN_GETDISPINFOA (TBN_FIRST - 16)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
242 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
243 #ifndef TBN_GETDISPINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
244 #define TBN_GETDISPINFOW (TBN_FIRST - 17)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
245 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
246 #ifndef TBN_GETINFOTIPA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
247 #define TBN_GETINFOTIPA (TBN_FIRST - 18)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
248 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
249 #ifndef TBN_GETINFOTIPW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
250 #define TBN_GETINFOTIPW (TBN_FIRST - 19)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
251 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
252 #ifndef TTN_GETDISPINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
253 #define TTN_GETDISPINFOA (TTN_FIRST - 0)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
254 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
255 #ifndef TTN_GETDISPINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
256 #define TTN_GETDISPINFOW (TTN_FIRST - 10)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
257 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
258
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
259 #if (_WIN32_IE >= 0x0400)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
260
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
261 #ifndef LVN_GETINFOTIPA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
262 #define LVN_GETINFOTIPA (LVN_FIRST - 57)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
263 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
264 #ifndef LVN_GETINFOTIPW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
265 #define LVN_GETINFOTIPW (LVN_FIRST - 58)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
266 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
267 #ifndef TVN_GETINFOTIPA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
268 #define TVN_GETINFOTIPA (TVN_FIRST - 13)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
269 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
270 #ifndef TVN_GETINFOTIPW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
271 #define TVN_GETINFOTIPW (TVN_FIRST - 14)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
272 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
273 #ifndef CBEN_GETDISPINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
274 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
275 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
276 #ifndef CBEN_GETDISPINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
277 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
278 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
279 #ifndef CBEN_DRAGBEGINA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
280 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
281 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
282 #ifndef CBEN_DRAGBEGINW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
283 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
284 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
285
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
286 #endif /* (_WIN32_IE >= 0x0400) */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
287
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
288 #ifndef CBEN_ENDEDITA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
289 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
290 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
291 #ifndef CBEN_ENDEDITW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
292 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
293 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
294
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
295 #ifndef CBEMAXSTRLEN
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
296 #define CBEMAXSTRLEN 260
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
297 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
298
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
299 #ifndef NMCBEENDEDIT
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
300
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
301 typedef struct
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
302 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
303 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
304 BOOL fChanged;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
305 int iNewSelection;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
306 WCHAR szText[CBEMAXSTRLEN];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
307 int iWhy;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
308 } NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
309
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
310 typedef struct
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
311 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
312 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
313 BOOL fChanged;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
314 int iNewSelection;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
315 char szText[CBEMAXSTRLEN];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
316 int iWhy;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
317 } NMCBEENDEDITA, *LPNMCBEENDEDITA,*PNMCBEENDEDITA;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
318
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
319 #endif /* not NMCBEENDEDIT */
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
320
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
321 #if (_WIN32_IE >= 0x0400)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
322
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
323 #ifndef NMCBEDRAGBEGIN
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
324
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
325 typedef struct
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
326 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
327 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
328 int iItemid;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
329 WCHAR szText[CBEMAXSTRLEN];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
330 } NMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
331
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
332 typedef struct
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
333 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
334 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
335 int iItemid;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
336 char szText[CBEMAXSTRLEN];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
337 } NMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
338
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
339 #endif /* not NMCBEDRAGBEGIN */
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
340
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
341 typedef struct tagNMDATETIMEFORMATA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
342 {
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
343 NMHDR nmhdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
344 LPCSTR pszFormat;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
345 SYSTEMTIME st;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
346 LPCSTR pszDisplay;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
347 CHAR szDisplay[64];
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
348 } NMDATETIMEFORMATA, FAR * LPNMDATETIMEFORMATA;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
349
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
350 typedef struct tagNMDATETIMEFORMATW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
351 {
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
352 NMHDR nmhdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
353 LPCWSTR pszFormat;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
354 SYSTEMTIME st;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
355 LPCWSTR pszDisplay;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
356 WCHAR szDisplay[64];
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
357 } NMDATETIMEFORMATW, FAR * LPNMDATETIMEFORMATW;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
358
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
359 typedef struct tagNMTTDISPIFNOA
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
360 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
361 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
362 LPSTR lpszText;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
363 char szText[80];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
364 HINSTANCE hinst;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
365 UINT uFlags;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
366 #if (_WIN32_IE >= 0x0300)
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
367 LPARAM lParam;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
368 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
369 } NMTTDISPINFOA, FAR *LPNMTTDISPINFOA;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
370
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
371 typedef struct tagNMTTDISPINFOW
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
372 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
373 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
374 LPWSTR lpszText;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
375 WCHAR szText[80];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
376 HINSTANCE hinst;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
377 UINT uFlags;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
378 #if (_WIN32_IE >= 0x0300)
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
379 LPARAM lParam;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
380 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
381 } NMTTDISPINFOW, FAR *LPNMTTDISPINFOW;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
382
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
383 #endif /* (_WIN32_IE >= 0x0400) */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
384
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
385 /* shlobj.h defines */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
386 #ifndef BFFM_VALIDATEFAILEDA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
387 #define BFFM_VALIDATEFAILEDA 3
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
388 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
389 #ifndef BFFM_VALIDATEFAILEDW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
390 #define BFFM_VALIDATEFAILEDW 4
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
391 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
392 #ifndef BFFM_SETSELECTIONA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
393 #define BFFM_SETSELECTIONA (WM_USER + 102)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
394 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
395 #ifndef BFFM_SETSELECTIONW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
396 #define BFFM_SETSELECTIONW (WM_USER + 103)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
397 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
398 #ifndef BFFM_SETSTATUSTEXTA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
399 #define BFFM_SETSTATUSTEXTA (WM_USER + 100)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
400 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
401 #ifndef BFFM_SETSTATUSTEXTW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
402 #define BFFM_SETSTATUSTEXTW (WM_USER + 104)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
403 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
404 #ifndef SHARD_PATHA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
405 #define SHARD_PATHA 2
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
406 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
407 #ifndef SHARD_PATHW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
408 #define SHARD_PATHW 3
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
409 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
410 #ifndef SHCNF_PATHA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
411 #define SHCNF_PATHA 1
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
412 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
413 #ifndef SHCNF_PATHW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
414 #define SHCNF_PATHW 5
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
415 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
416 #ifndef SHCNF_PRINTERA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
417 #define SHCNF_PRINTERA 2
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
418 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
419 #ifndef SHCNF_PRINTERW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
420 #define SHCNF_PRINTERW 6
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
421 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
422 #ifndef BFFM_VALIDATEFAILED
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
423 #ifdef UNICODE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
424 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
425 #else
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
426 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
427 #endif
819
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
428 #endif
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
429
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
430 /* winnls.h defines */
819
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
431 #ifndef MAC_CHARSET
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
432 #define MAC_CHARSET 77
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
433 #endif
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
434 #ifndef LOCALE_RETURN_NUMBER
819
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
435 #define LOCALE_RETURN_NUMBER 0x20000000
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
436 #endif
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
437
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
438 /* OEM resources */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
439 #ifndef OCR_ICOCUR
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
440 #define OCR_ICOCUR 32647
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
441 #define OIC_SAMPLE 32512
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
442 #define OIC_HAND 32513
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
443 #define OIC_QUES 32514
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
444 #define OIC_BANG 32515
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
445 #define OIC_NOTE 32516
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
446 #define OIC_WINLOGO 32517
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
447 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
448
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
449 /* More Cygwin stupidity: Current w32api's winuser.h has IME message
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
450 constants and they conflict with imm.h. (NOTE: Currently fixed, but
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
451 I'm sure the problems were present post 1.0.) */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
452 #undef WM_IME_STARTCOMPOSITION
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
453 #undef WM_IME_ENDCOMPOSITION
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
454 #undef WM_IME_COMPOSITION
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
455 #undef WM_IME_KEYLAST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
456 #undef WM_IME_SETCONTEXT
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
457 #undef WM_IME_NOTIFY
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
458 #undef WM_IME_CONTROL
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
459 #undef WM_IME_COMPOSITIONFULL
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
460 #undef WM_IME_SELECT
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
461 #undef WM_IME_CHAR
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
462 #undef WM_IME_KEYDOWN
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
463 #undef WM_IME_KEYUP
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
464
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
465 #include <imm.h>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
466
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
467 typedef struct _SHQUERYRBINFO
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
468 {
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
469 DWORD cbSize;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
470 __int64 i64Size;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
471 __int64 i64NumItems;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
472 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
473
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
474 typedef LPCDLGTEMPLATE LPCDLGTEMPLATEW;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
475 typedef LPCDLGTEMPLATE LPCDLGTEMPLATEA;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
476
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
477 #endif /* CYGWIN_HEADERS */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
478
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
479 /* Not in VC 6 */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
480 #ifndef BIF_NEWDIALOGSTYLE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
481 #define BIF_NEWDIALOGSTYLE 64
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
482 #endif
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
483
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
484 #ifdef CYGWIN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
485
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
486 /* All but wcscmp and wcslen left out of Cygwin headers -- but present
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
487 in /usr/include/mingw/string.h! */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
488 wchar_t* wcscat (wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
489 wchar_t* wcschr (const wchar_t*, wchar_t);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
490 int wcscoll (const wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
491 wchar_t* wcscpy (wchar_t*, const wchar_t*);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
492 wchar_t* wcsdup (const wchar_t*);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
493 size_t wcscspn (const wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
494 /* Note: No wcserror in CRTDLL. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
495 wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
496 int wcsncmp (const wchar_t*, const wchar_t*, size_t);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
497 wchar_t* wcsncpy (wchar_t*, const wchar_t*, size_t);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
498 wchar_t* wcspbrk (const wchar_t*, const wchar_t*);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
499 wchar_t* wcsrchr (const wchar_t*, wchar_t);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
500 size_t wcsspn (const wchar_t*, const wchar_t*);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
501 wchar_t* wcsstr (const wchar_t*, const wchar_t*);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
502 wchar_t* wcstok (wchar_t*, const wchar_t*);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
503 size_t wcsxfrm (wchar_t*, const wchar_t*, size_t);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
504
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
505 #endif /* CYGWIN */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
506
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
507 /* ------------------------- Unicode encapsulation ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
508
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
509 /* See intl-encap-win32.c for more information about Unicode-encapsulation */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
510
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
511 #define ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
512
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
513 #include "intl-auto-encap-win32.h"
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
514
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
515 /* would be encapsulatable but for parsing problems */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
516
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
517 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
518 #undef DefWindowProc
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
519 #define DefWindowProc error use qxeDefWindowProc or DefWindowProcA/DefWindowProcW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
520 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
521 LRESULT qxeDefWindowProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
522
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
523 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
524 #undef CallWindowProc
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
525 #define CallWindowProc error use qxeCallWindowProc or CallWindowProcA/CallWindowProcW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
526 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
527 LRESULT qxeCallWindowProc (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
528 WPARAM wParam, LPARAM lParam);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
529
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
530 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
531 #undef DefDlgProc
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
532 #define DefDlgProc error use qxeDefDlgProc or DefDlgProcA/DefDlgProcW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
533 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
534 LRESULT qxeDefDlgProc (HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
535
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
536 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
537 #undef SetWindowsHook
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
538 #define SetWindowsHook error use qxeSetWindowsHook or SetWindowsHookA/SetWindowsHookW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
539 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
540 HHOOK qxeSetWindowsHook (int nFilterType, HOOKPROC pfnFilterProc);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
541
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
542 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
543 #undef DefMDIChildProc
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
544 #define DefMDIChildProc error use qxeDefMDIChildProc or DefMDIChildProcA/DefMDIChildProcW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
545 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
546 LRESULT qxeDefMDIChildProc (HWND hWnd, UINT uMsg, WPARAM wParam,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
547 LPARAM lParam);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
548
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
549 #undef GetEnvironmentStrings
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
550 #undef GetEnvironmentStringsA
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
551 #define GetEnvironmentStringsA GetEnvironmentStrings
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
552 Extbyte * qxeGetEnvironmentStrings (void);
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
553
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
554 /* would be encapsulatable but for Cygwin problems */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
555
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
556 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
557 #undef DdeCreateStringHandle
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
558 #define DdeCreateStringHandle error use qxeDdeCreateStringHandle or DdeCreateStringHandleA/DdeCreateStringHandleW
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
559 #endif
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
560 HSZ qxeDdeCreateStringHandle (DWORD idInst, const Extbyte * psz, int iCodePage);
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
561
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
562 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
563 #undef RegConnectRegistry
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
564 #define RegConnectRegistry error use qxeRegConnectRegistry or RegConnectRegistryA/RegConnectRegistryW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
565 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
566 LONG qxeRegConnectRegistry (const Extbyte * lpMachineName, HKEY hKey, PHKEY phkResult);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
567
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
568 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
569 #undef ExtractIconEx
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
570 #define ExtractIconEx error use qxeExtractIconEx or ExtractIconExA/ExtractIconExW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
571 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
572 UINT qxeExtractIconEx (const Extbyte * lpszFile, int nIconIndex, HICON FAR * phiconLarge, HICON FAR * phiconSmall, UINT nIcons);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
573
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
574 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
575 #undef GetICMProfile
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
576 #define GetICMProfile error use qxeGetICMProfile or GetICMProfileA/GetICMProfileW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
577 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
578 BOOL qxeGetICMProfile (HDC arg1, LPDWORD arg2, Extbyte * arg3);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
579
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
580 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
581 #undef UpdateICMRegKey
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
582 #define UpdateICMRegKey error use qxeUpdateICMRegKey or UpdateICMRegKeyA/UpdateICMRegKeyW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
583 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
584 BOOL qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
585
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
586 /* files */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
587 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
588 #undef FindFirstFile
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
589 #define FindFirstFile error use qxeFindFirstFile or FindFirstFileA/FindFirstFileW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
590 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
591 HANDLE qxeFindFirstFile (const Extbyte *lpFileName,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
592 WIN32_FIND_DATAW *lpFindFileData);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
593
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
594 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
595 #undef FindNextFile
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
596 #define FindNextFile error use qxeFindNextFile or FindNextFileA/FindNextFileW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
597 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
598 BOOL qxeFindNextFile (HANDLE hFindFile, WIN32_FIND_DATAW *lpFindFileData);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
599
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
600 /* shell */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
601 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
602 #undef SHGetFileInfo
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
603 #define SHGetFileInfo error use qxeSHGetFileInfo or SHGetFileInfoA/SHGetFileInfoW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
604 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
605 DWORD qxeSHGetFileInfo (const Extbyte *pszPath, DWORD dwFileAttributes,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
606 SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
607
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
608 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
609 #undef SHBrowseForFolder
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
610 #define SHBrowseForFolder error use qxeSHBrowseForFolder or SHBrowseForFolderA/SHBrowseForFolderW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
611 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
612 LPITEMIDLIST qxeSHBrowseForFolder (LPBROWSEINFOW lpbi);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
613
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
614 /* Not Unicode-split */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
615 VOID qxeSHAddToRecentDocs (UINT uFlags, LPCVOID pv);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
616
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
617 /* Not Unicode-split */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
618 VOID qxeSHChangeNotify (LONG wEventId, UINT uFlags, LPCVOID dwItem1,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
619 LPCVOID dwItem2);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
620
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
621 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
622 #undef SHGetDataFromIDList
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
623 #define SHGetDataFromIDList error use qxeSHGetDataFromIDList or SHGetDataFromIDListA/SHGetDataFromIDListW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
624 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
625 HRESULT qxeSHGetDataFromIDList (IShellFolder *psf, LPCITEMIDLIST pidl,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
626 int nFormat, PVOID pv, int cb);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
627
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
628 /* devmode */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
629 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
630 #undef CreateDC
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
631 #define CreateDC error use qxeCreateDC or CreateDCA/CreateDCW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
632 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
633 HDC qxeCreateDC (const Extbyte *lpszDriver, const Extbyte *lpszDevice,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
634 const Extbyte *lpszOutput, CONST DEVMODEW *lpInitData);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
635
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
636 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
637 #undef ResetDC
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
638 #define ResetDC error use qxeResetDC or ResetDCA/ResetDCW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
639 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
640 HDC qxeResetDC (HDC hdc, CONST DEVMODEW *lpInitData);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
641
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
642 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
643 #undef OpenPrinter
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
644 #define OpenPrinter error use qxeOpenPrinter or OpenPrinterA/OpenPrinterW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
645 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
646 DWORD qxeOpenPrinter (Extbyte *pPrinterName, LPHANDLE phPrinter,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
647 LPPRINTER_DEFAULTSW pDefaultconst);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
648
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
649 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
650 #undef DocumentProperties
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
651 #define DocumentProperties error use qxeDocumentProperties or DocumentPropertiesA/DocumentPropertiesW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
652 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
653 LONG qxeDocumentProperties (HWND hWnd, HANDLE hPrinter, Extbyte *pDeviceName,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
654 DEVMODEW *pDevModeOutput, DEVMODEW *pDevModeInput,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
655 DWORD fMode);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
656
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
657 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
658 #undef PrintDlg
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
659 #define PrintDlg error use qxePrintDlg or PrintDlgA/PrintDlgW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
660 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
661 BOOL qxePrintDlg (PRINTDLGW *lppd);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
662
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
663 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
664 #undef PageSetupDlg
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
665 #define PageSetupDlg error use qxePageSetupDlg or PageSetupDlgA/PageSetupDlgW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
666 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
667 BOOL qxePageSetupDlg (PAGESETUPDLGW *lppd);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
668
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
669 /* fonts */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
670
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
671 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
672 #undef EnumFontFamiliesEx
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
673 #define EnumFontFamiliesEx error use qxeEnumFontFamiliesEx or EnumFontFamiliesExA/EnumFontFamiliesExW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
674 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
675 int qxeEnumFontFamiliesEx (HDC hdc, LOGFONTW *lpLogfont,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
676 FONTENUMPROCW lpEnumFontFamProc, LPARAM lParam,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
677 DWORD dwFlags);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
678
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
679 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
680 #undef CreateFontIndirect
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
681 #define CreateFontIndirect error use qxeCreateFontIndirect or CreateFontIndirectA/CreateFontIndirectW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
682 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
683 HFONT qxeCreateFontIndirect (CONST LOGFONTW *lplf);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
684
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
685 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
686 #undef ImmSetCompositionFont
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
687 #define ImmSetCompositionFont error use qxeImmSetCompositionFont or ImmSetCompositionFontA/ImmSetCompositionFontW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
688 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
689 BOOL qxeImmSetCompositionFont (HIMC imc, LOGFONTW *lplf);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
690
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
691 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
692 #undef ImmGetCompositionFont
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
693 #define ImmGetCompositionFont error use qxeImmGetCompositionFont or ImmGetCompositionFontA/ImmGetCompositionFontW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
694 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
695 BOOL qxeImmGetCompositionFont (HIMC imc, LOGFONTW *lplf);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
696
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
697 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
698 #undef GetObject
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
699 #define GetObject error use qxeGetObject or GetObjectA/GetObjectW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
700 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
701 int qxeGetObject (HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
702
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
703 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
704 #undef GetTextMetrics
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
705 #define GetTextMetrics error use qxeGetTextMetrics or GetTextMetricsA/GetTextMetricsW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
706 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
707 BOOL qxeGetTextMetrics (HDC hdc, LPTEXTMETRICW lptm);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
708
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
709 /* COMMCTRL.H */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
710
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
711 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
712 #undef SendMessage
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
713 #define SendMessage error use qxeSendMessage or SendMessageA/SendMessageW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
714 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
715 LRESULT qxeSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
716
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
717 /* windows */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
718
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
719 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
720 #undef RegisterClass
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
721 #define RegisterClass error use qxeRegisterClass or RegisterClassA/RegisterClassW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
722 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
723 ATOM qxeRegisterClass (CONST WNDCLASSW * lpWndClass);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
724
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
725 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
726 #undef UnregisterClass
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
727 #define UnregisterClass error use qxeUnregisterClass or UnregisterClassA/UnregisterClassW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
728 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
729 BOOL qxeUnregisterClass (const Extbyte * lpClassName, HINSTANCE hInstance);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
730
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
731 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
732 #undef RegisterClassEx
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
733 #define RegisterClassEx error use qxeRegisterClassEx or RegisterClassExA/RegisterClassExW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
734 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
735 ATOM qxeRegisterClassEx (CONST WNDCLASSEXW * arg1);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
736
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
737 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
738 #undef CreateWindow
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
739 #define CreateWindow error use qxeCreateWindow or CreateWindowA/CreateWindowW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
740 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
741 #define qxeCreateWindow(lpClassName, lpWindowName, dwStyle, x, y, \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
742 nWidth, nHeight, hWndParent, hMenu, hInstance, \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
743 lpParam) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
744 qxeCreateWindowEx (0L, lpClassName, lpWindowName, dwStyle, x, y, \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
745 nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
746
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
747 /* ------------------------- Unicode conversion ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
748
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
749 /* Set early in command-line processing, when -nuni or
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
750 --no-unicode-lib-calls is seen. */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
751 extern int no_mswin_unicode_lib_calls;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
752 /* Set early, in init_win32_very_early(). */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
753 extern int mswindows_windows9x_p;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
754 #define XEUNICODE_P (!mswindows_windows9x_p && !no_mswin_unicode_lib_calls)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
755
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
756 #define XELPTSTR LPWSTR
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
757 #define XELPCTSTR LPCWSTR
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
758
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
759 #define XETCHAR_SIZE (XEUNICODE_P ? sizeof (WCHAR) : sizeof (CHAR))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
760 #define MAX_XETCHAR_SIZE sizeof (WCHAR)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
761 #define XETEXT1(arg) (XEUNICODE_P ? ((char *) (L##arg)) : (arg))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
762 /* We need to do this indirection in case ARG is also a manifest constant.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
763 I don't really understand why. --ben */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
764 #define XETEXT(arg) XETEXT1(arg)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
765 #define XECOPY_TCHAR(ptr, ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
766 (XEUNICODE_P ? (* (LPWSTR) (ptr) = L##ch) : (* (LPSTR) (ptr) = (ch)))
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
767 #define xetcslen(arg) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
768 (XEUNICODE_P ? wcslen ((wchar_t *) arg) : strlen (arg))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
769 #define xetcsbytelen(arg) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
770 (XEUNICODE_P ? wcslen ((wchar_t *) arg) * XETCHAR_SIZE : strlen (arg))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
771 #define xetcscmp(s1, s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
772 (XEUNICODE_P ? wcscmp ((wchar_t *) s1, (wchar_t *) s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
773 : strcmp (s1, s2))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
774 #define xetcscpy(s1, s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
775 (XEUNICODE_P ? (char *) wcscpy ((wchar_t *) s1, (wchar_t *) s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
776 : strcpy (s1, s2))
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
777 #define xetcsncpy(s1, s2, n) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
778 (XEUNICODE_P ? (char *) wcsncpy ((wchar_t *) s1, (wchar_t *) s2, n) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
779 : strncpy (s1, s2, n))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
780 #define xetcschr(s, ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
781 (XEUNICODE_P ? (char *) wcschr ((wchar_t *) s, (WCHAR) ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
782 : strchr (s, ch))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
783 #define xetcsrchr(s, ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
784 (XEUNICODE_P ? (char *) wcsrchr ((wchar_t *) s, (WCHAR) ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
785 : strrchr (s, ch))
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
786 #define xetcsdup(s) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
787 (XEUNICODE_P ? (char *) wcsdup ((wchar_t *) s) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
788 : xstrdup (s))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
789
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
790 #define C_STRING_TO_TSTR(in, out) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
791 C_STRING_TO_EXTERNAL (in, out, Qmswindows_tstr)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
792 #define LISP_STRING_TO_TSTR(in, out) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
793 LISP_STRING_TO_EXTERNAL (in, out, Qmswindows_tstr)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
794 #define TSTR_TO_C_STRING(in, out) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
795 EXTERNAL_TO_C_STRING (in, out, Qmswindows_tstr)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
796 #define TSTR_TO_C_STRING_MALLOC(in, out) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
797 EXTERNAL_TO_C_STRING_MALLOC (in, out, Qmswindows_tstr)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
798
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
799 #define build_tstr_string(in) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
800 make_ext_string (in, xetcsbytelen ((Extbyte *) in), Qmswindows_tstr)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
801
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
802 #define MAX_ANSI_CHAR_LEN 1
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
803 #define MAX_UNICODE_CHAR_LEN 2
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
804
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
805 DECLARE_INLINE_HEADER (int ansi_char_to_text (int ch, Extbyte *t))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
806 {
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
807 ch &= 0xFF;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
808 t[0] = ch;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
809 return 1;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
810 }
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
811
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
812 DECLARE_INLINE_HEADER (int unicode_char_to_text (int ch, Extbyte *t))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
813 {
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
814 t[0] = ch & 0xFF;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
815 t[1] = (ch >> 8) & 0xFF;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
816 return 2;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
817 }
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
818
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
819 Extbyte *convert_multibyte_to_unicode_malloc (const Extbyte *src,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
820 Bytecount n,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
821 int cp, Bytecount *size_out);
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
822 Ibyte *convert_multibyte_to_internal_malloc (const Extbyte *src,
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
823 Bytecount n,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
824 int cp, Bytecount *size_out);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
825 void convert_multibyte_to_unicode_dynarr (const Extbyte *src, Bytecount n,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
826 int cp, unsigned_char_dynarr *dst);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
827
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
828 /* ------------------------- Other Mule stuff ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
829
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
830 LCID mswindows_current_locale (void);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
831 int mswindows_locale_to_code_page (LCID lcid);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
832 int mswindows_locale_to_oem_code_page (LCID lcid);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
833
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
834 /* ------------------------- Filename conversion ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
835
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
836 #ifdef CYGWIN
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
837 #ifdef __cplusplus
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
838 extern "C" {
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
839 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
840 void cygwin_win32_to_posix_path_list (const char *, char *);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
841 int cygwin_win32_to_posix_path_list_buf_size (const char *);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
842 void cygwin_posix_to_win32_path_list (const char *, char *);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
843 int cygwin_posix_to_win32_path_list_buf_size (const char *);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
844 #ifdef __cplusplus
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
845 }
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
846 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
847 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
848
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
849 #define LOCAL_FILE_FORMAT_TO_TSTR(path, out) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
850 do { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
851 Ibyte *lttff; \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
852 \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
853 LOCAL_TO_WIN32_FILE_FORMAT (XSTRING_DATA (path), lttff); \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
854 C_STRING_TO_TSTR (lttff, out); \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
855 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
856
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
857 Lisp_Object tstr_to_local_file_format (Extbyte *pathout);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
858
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
859 /* Convert from local file format, as used in XEmacs, to valid win32
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
860 filenames as can be given to Windows API routines. Under native XEmacs,
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
861 this is a no-op, but under Cygwin, the local names look different --
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
862 Cygwin mount points, forward slashes, etc. Currently, under Cygwin, we
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
863 actually allow local names to be of both formats, i.e. Cygwin or Win32
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
864 native. So we check to see if we have Win32 native already (a cheesy
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
865 check, look for letter plus colon at beginning of name) and do nothing
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
866 in that case. */
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
867
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
868 #ifdef CYGWIN
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
869 #define LOCAL_TO_WIN32_FILE_FORMAT(path, pathout) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
870 do { \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
871 /* NOTE: It is a bit evil that here and below we are passing \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
872 internal-format data to a function that (nominally) should work \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
873 with external-format data. But in point of fact, the Cygwin \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
874 conversion functions are *NOT* localized, and will fail if they \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
875 get 7-bit ISO2022-encoded data. We know that our internal format \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
876 is ASCII-compatible, and so these functions will work fine with \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
877 this data. */ \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
878 Ibyte *ltwffp = (path); \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
879 if (isalpha (ltwffp[0]) && (IS_DEVICE_SEP (ltwffp[1]))) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
880 pathout = ltwffp; \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
881 else \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
882 { \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
883 int ltwff2 = \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
884 cygwin_posix_to_win32_path_list_buf_size ((char *) ltwffp); \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
885 pathout = (Ibyte *) ALLOCA (ltwff2); \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
886 cygwin_posix_to_win32_path_list ((char *) ltwffp, (char *) pathout); \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
887 } \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
888 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
889 #else
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
890 #define LOCAL_TO_WIN32_FILE_FORMAT(path, pathout) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
891 do { \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
892 (pathout) = (path); \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
893 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
894 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
895
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
896 #ifdef CYGWIN
593
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
897 #define WIN32_TO_LOCAL_FILE_FORMAT(path, pathout) \
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
898 do { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
899 Ibyte *wtlff1 = (path); \
593
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
900 int wtlff2 = \
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
901 cygwin_win32_to_posix_path_list_buf_size ((char *) wtlff1); \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
902 Ibyte *wtlff3 = (Ibyte *) ALLOCA (wtlff2); \
593
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
903 cygwin_win32_to_posix_path_list ((char *) wtlff1, (char *) wtlff3); \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
904 (pathout) = wtlff3; \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
905 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
906 #else
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
907 #define WIN32_TO_LOCAL_FILE_FORMAT(path, pathout) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
908 do { \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
909 (pathout) = (path); \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
910 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
911 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
912
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
913 /* Convert a local-format file name or URL in internal format into a Win32
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
914 file name or URL in tstr format. */
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
915
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
916 #ifdef CYGWIN
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
917
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
918 #define LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR(lispstr, pathout) \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
919 do \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
920 { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
921 Ibyte *lffmutt_fname1; \
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
922 Ibyte *lffmutt_pathint = XSTRING_DATA (lispstr); \
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
923 \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
924 if ((lffmutt_fname1 = qxestrchr (lffmutt_pathint, ':')) != NULL \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
925 && *++lffmutt_fname1 == '/' && *++lffmutt_fname1 == '/') \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
926 { \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
927 /* If URL style file, the innards may have Cygwin mount points and \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
928 the like. so separate out the innards, process them, and put back \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
929 together. */ \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
930 if (qxestrncasecmp_c (lffmutt_pathint, "file://", 7) == 0) \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
931 { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
932 Ibyte *lffmutt_path1, *lffmutt_path2; \
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
933 LOCAL_TO_WIN32_FILE_FORMAT (lffmutt_pathint + 7, lffmutt_path1); \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
934 if (lffmutt_path1 == lffmutt_pathint + 7) /* Optimization */ \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
935 lffmutt_path2 = lffmutt_pathint; \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
936 else \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
937 { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
938 lffmutt_path2 = alloca_ibytes (7 + qxestrlen (lffmutt_path1) \
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
939 + 1); \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
940 qxestrncpy (lffmutt_path2, lffmutt_pathint, 7); \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
941 qxestrcpy (lffmutt_path2 + 7, lffmutt_path1); \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
942 } \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
943 C_STRING_TO_TSTR (lffmutt_path2, pathout); \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
944 } \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
945 else \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
946 /* A straight URL, just convert */ \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
947 LISP_STRING_TO_TSTR (lispstr, pathout); \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
948 } \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
949 else \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
950 /* Not URL-style, must be a straight filename. */ \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
951 LOCAL_FILE_FORMAT_TO_TSTR (lispstr, pathout); \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
952 } while (0)
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
953
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
954 #else /* not CYGWIN */
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
955
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
956 /* URL's (and everything else) are already in the right format */
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
957 #define LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR(lispstr, pathout) \
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
958 LOCAL_FILE_FORMAT_TO_TSTR (lispstr, pathout)
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
959
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
960 #endif /* not CYGWIN */
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
961
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
962
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
963 Ibyte *urlify_filename (Ibyte *filename);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
964 Ibyte *mswindows_canonicalize_filename (Ibyte *name);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
965 #define MSWINDOWS_NORMALIZE_FILENAME(name) \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
966 IBYTE_STRING_TO_ALLOCA (mswindows_canonicalize_filename (name), name)
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
967
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
968 /* ------------------- Functions needed dynamic binding ------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
969
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
970 typedef BOOL (WINAPI *pfSwitchToThread_t) (VOID);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
971
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
972 typedef NET_API_STATUS (NET_API_FUNCTION *pfNetUserEnum_t)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
973 (LPCWSTR, DWORD, DWORD, LPBYTE *, DWORD, LPDWORD, LPDWORD, LPDWORD);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
974 typedef NET_API_STATUS (NET_API_FUNCTION *pfNetApiBufferFree_t) (LPVOID);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
975
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
976 extern pfSwitchToThread_t xSwitchToThread;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
977
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
978 extern pfNetUserEnum_t xNetUserEnum;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
979 extern pfNetApiBufferFree_t xNetApiBufferFree;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
980
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
981 /* --------- Useful routines for manipulating memory-mapped files -------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
982
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
983 typedef struct file_data
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
984 {
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
985 const Ibyte *name;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
986 unsigned long size;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
987 HANDLE file;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
988 HANDLE file_mapping;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
989 void *file_base;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
990 } file_data;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
991
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
992 #define OFFSET_TO_RVA(var,section) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
993 (section->VirtualAddress + \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
994 ((DWORD)(var) - section->PointerToRawData))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
995
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
996 #define RVA_TO_OFFSET(var,section) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
997 (section->PointerToRawData + \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
998 ((DWORD)(var) - section->VirtualAddress))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
999
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1000 #define RVA_TO_PTR(var,section,filedata) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1001 ((void *)(RVA_TO_OFFSET(var,section) + \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1002 (char *)(filedata).file_base))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1003
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1004 int open_input_file (file_data *p_file, const Ibyte *name);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1005 int open_output_file (file_data *p_file, const Ibyte *name,
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1006 unsigned long size);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1007 void close_file_data (file_data *p_file);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1008
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1009 /* ------------------------- Heap related stuff ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1010
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1011 #ifdef WIN32_NATIVE
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1012
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1013 #define get_reserved_heap_size() reserved_heap_size
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1014 #define get_committed_heap_size() (get_data_end () - get_data_start ())
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1015 #define get_heap_start() get_data_start ()
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1016 #define get_heap_end() get_data_end ()
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1017 #define get_page_size() sysinfo_cache.dwPageSize
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1018 #define get_allocation_unit() sysinfo_cache.dwAllocationGranularity
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1019 #define get_processor_type() sysinfo_cache.dwProcessorType
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1020 #define get_nt_major_version() nt_major_version
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1021 #define get_nt_minor_version() nt_minor_version
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1022
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1023 unsigned char *get_data_start (void);
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1024 unsigned char *get_data_end (void);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1025 extern unsigned long data_region_size;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1026 extern unsigned long reserved_heap_size;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1027 extern SYSTEM_INFO sysinfo_cache;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1028 extern int nt_major_version;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1029 extern int nt_minor_version;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1030
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1031 /* To prevent zero-initialized variables from being placed into the bss
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1032 section, use non-zero values to represent an uninitialized state. */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1033 #define UNINIT_PTR ((unsigned char*) 0xF0A0F0A0)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1034 #define UNINIT_LONG (0xF0A0F0A0L)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1035
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1036 /* Recreate the heap created during dumping. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1037 void recreate_heap (Extbyte *executable_path);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1038
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1039 /* Round the heap to this size. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1040 void round_heap (unsigned long size);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1041
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1042 /* Load in the dumped .bss section. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1043 void read_in_bss (Extbyte *name);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1044
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1045 /* Map in the dumped heap. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1046 void map_in_heap (Extbyte *name);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1047
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1048 /* Cache system info, e.g., the NT page size. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1049 void cache_system_info (void);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1050
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1051 /* Round ADDRESS up to be aligned with ALIGN. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1052 unsigned char *round_to_next (unsigned char *address,
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1053 unsigned long align);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1054 #endif /* WIN32_NATIVE */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1055
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1056 /* ------------------------- Misc prototypes ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1057
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1058 #ifdef WIN32_NATIVE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1059 DECLARE_INLINE_HEADER (int strcasecmp (const char *a, const char *b))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1060 {
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1061 return qxestrcasecmp ((const Ibyte *) a, (const Ibyte *) b);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1062 }
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1063 #endif /* WIN32_NATIVE */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1064
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1065 /* in nt.c */
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1066 int mswindows_access (const Ibyte *path, int mode);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1067 int mswindows_link (const Ibyte *old, const Ibyte *new);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1068 int mswindows_rename (const Ibyte *oldname, const Ibyte *newname);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1069 int mswindows_unlink (const Ibyte *path);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1070 int mswindows_stat (const Ibyte *path, struct stat *buf);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1071 int mswindows_fstat (int desc, struct stat *buf);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1072 time_t mswindows_convert_time (FILETIME ft);
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
1073 int mswindows_is_executable (const Ibyte *filename);
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
1074 void mswindows_executable_type (const Ibyte *filename, int *is_dos_app,
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
1075 int *is_cygnus_app);
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1076 Ibyte *mswindows_getdcwd (int drivelet);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1077
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1078 /* in process-nt.c */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1079 extern int mswindows_compare_env (const void *strp1, const void *strp2);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1080
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1081 /* in win32.c */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1082 Extbyte *mswindows_get_module_file_name (void);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1083 void mswindows_output_last_error (char *frob);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1084 DECLARE_DOESNT_RETURN (mswindows_report_process_error (const char *string,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1085 Lisp_Object data,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1086 int errnum));
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1087 Lisp_Object mswindows_lisp_error (int errnum);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1088
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1089 /* in intl-win32.c */
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1090 extern Lisp_Object Qmswindows_tstr, Qmswindows_unicode;
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1091 extern Lisp_Object Qmswindows_multibyte, Qmswindows_multibyte_to_unicode;
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1092
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1093 #endif /* INCLUDED_syswindows_h_ */