annotate src/console-xlike-inc.h @ 4976:16112448d484

Rename xfree(FOO, TYPE) -> xfree(FOO) -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-04 Ben Wing <ben@xemacs.org> * alloc.c (release_breathing_space): * alloc.c (resize_string): * alloc.c (sweep_lcrecords_1): * alloc.c (SWEEP_FIXED_TYPE_BLOCK_1): * alloc.c (ADDITIONAL_FREE_compiled_function): * alloc.c (compact_string_chars): * alloc.c (ADDITIONAL_FREE_string): * alloc.c (sweep_strings): * alloca.c (xemacs_c_alloca): * alsaplay.c (alsa_play_sound_file): * buffer.c (init_initial_directory): * buffer.h: * buffer.h (BUFFER_FREE): * console-stream.c (stream_delete_console): * console-tty.c (free_tty_console_struct): * data.c (Fnumber_to_string): * device-gtk.c (gtk_init_device): * device-gtk.c (free_gtk_device_struct): * device-gtk.c (gtk_delete_device): * device-msw.c (mswindows_delete_device): * device-msw.c (msprinter_delete_device): * device-tty.c (free_tty_device_struct): * device-tty.c (tty_delete_device): * device-x.c (x_init_device): * device-x.c (free_x_device_struct): * device-x.c (x_delete_device): * dialog-msw.c (handle_directory_dialog_box): * dialog-x.c (dbox_descriptor_to_widget_value): * dired-msw.c (Fmswindows_insert_directory): * dired.c (free_user_cache): * dired.c (user_name_completion_unwind): * doc.c (unparesseuxify_doc_string): * doc.c (Fsubstitute_command_keys): * doprnt.c (emacs_doprnt_1): * dumper.c (pdump_load_finish): * dumper.c (pdump_file_free): * dumper.c (pdump_file_unmap): * dynarr.c: * dynarr.c (Dynarr_free): * editfns.c (uncache_home_directory): * editfns.c (Fset_time_zone_rule): * elhash.c: * elhash.c (pdump_reorganize_hash_table): * elhash.c (maphash_unwind): * emacs.c (make_arg_list_1): * emacs.c (free_argc_argv): * emacs.c (sort_args): * emacs.c (Frunning_temacs_p): * emodules.c (attempt_module_delete): * eval.c (free_pointer): * event-Xt.c (unselect_filedesc): * event-Xt.c (emacs_Xt_select_process): * event-gtk.c (unselect_filedesc): * event-gtk.c (dragndrop_data_received): * event-msw.c (winsock_closer): * event-msw.c (mswindows_dde_callback): * event-msw.c (mswindows_wnd_proc): * event-stream.c (finalize_command_builder): * event-stream.c (free_command_builder): * extents.c (free_gap_array): * extents.c (free_extent_list): * extents.c (free_soe): * extents.c (extent_fragment_delete): * extents.c (extent_priority_sort_function): * file-coding.c (make_coding_system_1): * file-coding.c (coding_finalizer): * file-coding.c (set_coding_stream_coding_system): * file-coding.c (chain_finalize_coding_stream_1): * file-coding.c (chain_finalize): * file-coding.c (free_detection_state): * file-coding.c (coding_category_symbol_to_id): * fileio.c: * fileio.c (Ffile_name_directory): * fileio.c (if): * fileio.c (Ffile_symlink_p): * filelock.c (FREE_LOCK_INFO): * filelock.c (current_lock_owner): * font-mgr.c (Ffc_name_unparse): * font-mgr.c (Ffc_pattern_duplicate): * frame-gtk.c (gtk_delete_frame): * frame-msw.c (mswindows_delete_frame): * frame-msw.c (msprinter_delete_frame): * frame-x.c (x_cde_destroy_callback): * frame-x.c (Fcde_start_drag_internal): * frame-x.c (x_cde_transfer_callback): * frame-x.c (x_delete_frame): * frame.c (update_frame_title): * frame.c (Fset_frame_pointer): * gc.c (register_for_finalization): * gccache-gtk.c (free_gc_cache): * gccache-gtk.c (gc_cache_lookup): * gccache-x.c (free_gc_cache): * gccache-x.c (gc_cache_lookup): * glyphs-eimage.c: * glyphs-eimage.c (jpeg_instantiate_unwind): * glyphs-eimage.c (gif_instantiate_unwind): * glyphs-eimage.c (png_instantiate_unwind): * glyphs-eimage.c (png_instantiate): * glyphs-eimage.c (tiff_instantiate_unwind): * glyphs-gtk.c (convert_EImage_to_GDKImage): * glyphs-gtk.c (gtk_finalize_image_instance): * glyphs-gtk.c (gtk_init_image_instance_from_eimage): * glyphs-gtk.c (gtk_xpm_instantiate): * glyphs-msw.c (convert_EImage_to_DIBitmap): * glyphs-msw.c (mswindows_init_image_instance_from_eimage): * glyphs-msw.c (mswindows_initialize_image_instance_mask): * glyphs-msw.c (xpm_to_eimage): * glyphs-msw.c (mswindows_xpm_instantiate): * glyphs-msw.c (xbm_create_bitmap_from_data): * glyphs-msw.c (mswindows_finalize_image_instance): * glyphs-x.c (convert_EImage_to_XImage): * glyphs-x.c (x_finalize_image_instance): * glyphs-x.c (x_init_image_instance_from_eimage): * glyphs-x.c (x_xpm_instantiate): * gui-x.c (free_popup_widget_value_tree): * hash.c (free_hash_table): * hash.c (grow_hash_table): * hash.c (pregrow_hash_table_if_necessary): * imgproc.c (build_EImage_quantable): * insdel.c (uninit_buffer_text): * intl-win32.c (convert_multibyte_to_internal_malloc): * intl.c: * intl.c (Fset_current_locale): * keymap.c: * keymap.c (where_is_recursive_mapper): * keymap.c (where_is_internal): * lisp.h: * lisp.h (xfree): * lstream.c (Lstream_close): * lstream.c (resizing_buffer_closer): * mule-coding.c: * mule-coding.c (iso2022_finalize_detection_state): * nt.c: * nt.c (mswindows_get_long_filename): * nt.c (nt_get_resource): * nt.c (init_mswindows_environment): * nt.c (get_cached_volume_information): * nt.c (mswindows_opendir): * nt.c (mswindows_closedir): * nt.c (mswindows_readdir): * nt.c (mswindows_stat): * nt.c (mswindows_getdcwd): * nt.c (Fmswindows_long_file_name): * ntplay.c (nt_play_sound_file): * ntplay.c (play_sound_data_1): * number-gmp.c (gmp_free): * number-gmp.c (init_number_gmp): * number-mp.c (bignum_to_string): * number-mp.c (BIGNUM_TO_TYPE): * number.c (bignum_print): * number.c (bignum_convfree): * number.c (ratio_print): * number.c (bigfloat_print): * number.c (bigfloat_finalize): * objects-gtk.c (gtk_finalize_color_instance): * objects-gtk.c (gtk_finalize_font_instance): * objects-msw.c (mswindows_finalize_color_instance): * objects-msw.c (mswindows_finalize_font_instance): * objects-tty.c (tty_finalize_color_instance): * objects-tty.c (tty_finalize_font_instance): * objects-tty.c (tty_font_list): * objects-x.c (x_finalize_color_instance): * objects-x.c (x_finalize_font_instance): * process.c: * process.c (finalize_process): * realpath.c: * redisplay.c (add_propagation_runes): * regex.c: * regex.c (xfree): * regex.c (REGEX_FREE_STACK): * regex.c (FREE_STACK_RETURN): * regex.c (regex_compile): * regex.c (regexec): * regex.c (regfree): * scrollbar-gtk.c (gtk_free_scrollbar_instance): * scrollbar-gtk.c (gtk_release_scrollbar_instance): * scrollbar-msw.c (mswindows_free_scrollbar_instance): * scrollbar-msw.c (unshow_that_mofo): * scrollbar-x.c (x_free_scrollbar_instance): * scrollbar-x.c (x_release_scrollbar_instance): * select-gtk.c (emacs_gtk_selection_handle): * select-msw.c (mswindows_own_selection): * select-x.c: * select-x.c (x_handle_selection_request): * select-x.c (unexpect_property_change): * select-x.c (x_handle_property_notify): * select-x.c (receive_incremental_selection): * select-x.c (x_get_window_property_as_lisp_data): * select-x.c (Fx_get_cutbuffer_internal): * specifier.c (finalize_specifier): * syntax.c (uninit_buffer_syntax_cache): * sysdep.c (qxe_allocating_getcwd): * sysdep.c (qxe_lstat): * sysdep.c (copy_in_passwd): * sysdep.c (qxe_ctime): * sysdep.c (closedir): * sysdep.c (DIRSIZ): * termcap.c (tgetent): * termcap.c (tprint): * tests.c (Ftest_data_format_conversion): * text.c (new_dfc_convert_copy_data): * text.h (eifree): * text.h (eito_alloca): * text.h (eito_external): * toolbar-msw.c (mswindows_output_toolbar): * ui-gtk.c (CONVERT_RETVAL): * ui-gtk.c (__allocate_object_storage): * unicode.c (free_from_unicode_table): * unicode.c (free_to_unicode_table): * unicode.c (free_charset_unicode_tables): * win32.c (mswindows_read_link_1): Rename: xfree(VAL, TYPE)->xfree(VAL) Command used: gr 'xfree *\((.*),.*\);' 'xfree (\1);' *.[ch] Followed by grepping for 'xfree.*,' and fixing anything left. Rationale: Having to specify the TYPE argument is annoying and error-prone. It was originally put in to work around warnings due to strict aliasing but years and years ago I rewrote it in a way that doesn't use the TYPE argument at all and no one has complained since then. (And anyway, XEmacs is far from ever being in compliance with strict aliasing and would require far-reaching changes to get that way.)
author Ben Wing <ben@xemacs.org>
date Thu, 04 Feb 2010 07:28:14 -0600
parents fce43cb76a1c
children 5502045ec510 8b2f75cecb89
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
1 /* Definitions for use in *-xlike-inc.c files.
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
2 Copyright (C) 2010 Ben Wing.
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
3
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
4 This file is part of XEmacs.
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
5
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
9 later version.
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
10
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
14 for more details.
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
15
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
20
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
21 /* Synched up with: Not in FSF. */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
22
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
23 #ifndef INCLUDED_console_xlike_inc_h_
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
24 #define INCLUDED_console_xlike_inc_h_
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
25
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
26 /* X and GTK are quite similar, since GTK based its structure on Xlib.
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
27 However, there are many small differences. Creating two separate
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
28 versions of the code, as Bill Perry did originally, is easier to code
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
29 but hard to maintain and leads to bit rot. On the other hand, trying to
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
30 abstract out into device methods, as is done generally for different
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
31 window systems, gets very hairy very quickly because the differences are
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
32 on the level of individual library functions, constants and types, of
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
33 which there are large number. Abstracting them into device methods
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
34 would lead to a large number of very small functions and very
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
35 hard-to-read code.
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
36
4917
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
37 Instead, we handle the situation by the following:
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
38
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
39 (1) In cases where there are lots of individual differences, we have
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
40 only one copy, placed in a file called *-xlike-inc.c
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
41 (e.g. redisplay-xlike-inc.c), and conditionalize using ifdefs. Because
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
42 we can compile with both X and GTK at once, we include this file inside
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
43 of the appropriate device-specific file (e.g. redisplay-gtk.c or
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
44 redisplay-x.c). The `inc' in *-xlike-inc.c indicates that this is a
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
45 file meant to be included in another file, despite the fact that it is a
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
46 .c file.
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
47
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
48 To signal which variety of "xlike" we are compiling for, either
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
49 THIS_IS_X or THIS_IS_GTK needs to be defined, prior to including the
4917
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
50 *-xlike-inc.c file.
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
51
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
52 (2) For code that is identical in both versions, or where it's possible
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
53 to have only one copy at runtime through some other means, we name
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
54 the file *-xlike.c. This is a normal file, not included in some other
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
55 file. An example of "other means" is toolbar-xlike.c, where all
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
56 functions are passed a frame or device, and it's possible to do run-time
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
57 conditionalization based on the device type. (This isn't currently the
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
58 case but will be soon once the related changes from my `hg-fixup'
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
59 workspace are checked in. --ben) */
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
60
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
61
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
62 /* About the representation of color below:
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
63
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
64 X has two ways of representing a color: (a) as an unsigned long
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
65 representing a color pixel value, i.e. the actual value stored in memory
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
66 or a file at a particular pixel location to indicate that the pixel
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
67 takes on a specific color; and (b) an XColor structure, which
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
68 encapsulates both the RGB components of a color and the associated color
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
69 pixel value.
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
70
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
71 We call the former type XLIKE_PIXEL and the latter XLIKE_COLOR, along
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
72 with routines to convert from one to the other. Differences between the
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
73 two in specific functions and structures should be abstracted using the
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
74 XLIKE_FOO() routines, e.g. XLIKE_SET_GC_COLOR(). */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
75
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
76 #if defined (THIS_IS_X) && defined (THIS_IS_GTK)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
77 #error "Exactly one of THIS_IS_X and THIS_IS_GTK may be defined."
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
78 #endif
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
79
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
80 #if !defined (THIS_IS_X) && !defined (THIS_IS_GTK)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
81 #error "Either THIS_IS_X or THIS_IS_GTK must be defined."
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
82 #endif
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
83
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
84 #ifdef THIS_IS_X
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
85 # include "console-x-impl.h"
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
86 # ifdef NEED_GCCACHE_H
4917
fce43cb76a1c xlike cleanup, documentation
Ben Wing <ben@xemacs.org>
parents: 4916
diff changeset
87 # include "gccache-x.h"
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
88 # endif
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
89 # ifdef NEED_GLYPHS_H
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
90 # include "glyphs-x.h"
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
91 # endif
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
92 # ifdef NEED_OBJECTS_IMPL_H
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
93 # include "objects-x-impl.h"
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
94 # endif
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
95 #else /* THIS_IS_GTK */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
96 # include "console-gtk-impl.h"
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
97 # ifdef NEED_GCCACHE_H
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
98 # include "gccache-gtk.h"
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
99 # endif
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
100 # ifdef NEED_GLYPHS_H
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
101 # include "glyphs-gtk.h"
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
102 # endif
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
103 # ifdef NEED_OBJECTS_IMPL_H
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
104 # include "objects-gtk-impl.h"
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
105 # endif
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
106 #endif /* THIS_IS_GTK */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
107
4916
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
108 /* Just because we have XFT support doesn't mean we should use it.
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
109 In particular, the xlike routines are used by both X and GTK code,
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
110 but XFT stuff is X-specific. HAVE_XFT will still be defined when
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
111 the GTK flavor is active, but we don't want to trigger the XFT code
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
112 in this case. We could just undefine HAVE_XFT but I'd rather make
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
113 it clearer that something else is going on. --ben */
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
114
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
115 #if defined (THIS_IS_X) && defined (HAVE_XFT)
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
116 #define USE_XFT
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
117 #define USE_XFT_MENUBARS
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
118 #define USE_XFT_TABS
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
119 #define USE_XFT_GAUGES
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
120 #endif
a6c778975d7d split USE_XFT into HAVE_XFT/USE_XFT
Ben Wing <ben@xemacs.org>
parents: 4908
diff changeset
121
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
122 /***************************************************************************/
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
123 /* Common definitions */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
124 /***************************************************************************/
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
125
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
126 #define XLIKE_PASTE_1(a,b) a##_##b
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
127 #define XLIKE_PASTE(a,b) XLIKE_PASTE_1(a,b)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
128 #define XFUN(name) XLIKE_PASTE (XLIKE_NAME, name)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
129
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
130 #define XLIKE_CONSOLE_HAS_METHOD_1(xlike, name) CONSOLE_HAS_METHOD (xlike, name)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
131 #define XLIKE_CONSOLE_HAS_METHOD(name) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
132 XLIKE_CONSOLE_HAS_METHOD_1 (XLIKE_NAME, name)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
133
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
134 #define XCOLOR_INSTANCE_XLIKE_COLOR(x) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
135 COLOR_INSTANCE_XLIKE_COLOR (XCOLOR_INSTANCE (x))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
136
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
137 #ifdef THIS_IS_X
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
138
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
139 /***************************************************************************/
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
140 /* Definitions implementing X flavor of XLIKE */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
141 /***************************************************************************/
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
142
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
143 #define XLIKE_NAME x
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
144 #define USED_IF_X(var) var
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
145 #define USED_IF_GTK(var) UNUSED (var)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
146
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
147 /* types */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
148 typedef Display * XLIKE_DISPLAY;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
149 typedef Window XLIKE_WINDOW;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
150 typedef GC XLIKE_GC;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
151 typedef XRectangle XLIKE_RECTANGLE;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
152 typedef XGCValues XLIKE_GCVALUES;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
153 typedef XColor XLIKE_COLOR;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
154 typedef unsigned long XLIKE_PIXEL;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
155
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
156 /* constants */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
157 #define XLIKE_NONE None
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
158 #define XLIKE_FALSE False
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
159
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
160 #define XLIKE_GC_BACKGROUND GCBackground
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
161 #define XLIKE_GC_CLIP_MASK GCClipMask
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
162 #define XLIKE_GC_CLIP_X_ORIGIN GCClipXOrigin
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
163 #define XLIKE_GC_CLIP_Y_ORIGIN GCClipYOrigin
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
164 #define XLIKE_GC_EXPOSURES GCGraphicsExposures
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
165 #define XLIKE_GC_FILL GCFillStyle
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
166 #define XLIKE_GC_FONT GCFont
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
167 #define XLIKE_GC_FOREGROUND GCForeground
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
168 #define XLIKE_GC_FUNCTION GCFunction
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
169 #define XLIKE_GC_LINE_WIDTH GCLineWidth
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
170 #define XLIKE_GC_STIPPLE GCStipple
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
171 #define XLIKE_GC_TILE GCTile
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
172
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
173 #define XLIKE_GX_COPY GXcopy
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
174 #define XLIKE_GX_XOR GXxor
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
175
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
176 #define XLIKE_FILL_STIPPLED FillStippled
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
177 #define XLIKE_FILL_OPAQUE_STIPPLED FillOpaqueStippled
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
178 #define XLIKE_FILL_TILED FillTiled
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
179 #define XLIKE_FILL_SOLID FillSolid
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
180
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
181 /* functions */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
182 #define GET_XLIKE_DISPLAY(d) DEVICE_X_DISPLAY (d)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
183 #define GET_XLIKE_X_DISPLAY(d) DEVICE_X_DISPLAY (d)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
184 #define GET_XLIKE_WINDOW(w) XtWindow (FRAME_X_TEXT_WIDGET (f))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
185 #define XLIKE_FILL_RECTANGLE(dpy, x_win, gc, x, y, width, height) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
186 XFillRectangle (dpy, x_win, gc, x, y, width, height)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
187 #define XLIKE_DRAW_RECTANGLE(dpy, x_win, gc, x, y, width, height) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
188 XDrawRectangle (dpy, x_win, gc, x, y, width, height)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
189 #define XLIKE_DRAW_LINE(dpy, x_win, gc, x1, y1, x2, y2) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
190 XDrawLine (dpy, x_win, gc, x1, y1, x2, y2)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
191 #define XLIKE_TEXT_WIDTH(fi, ptr, len) XTextWidth (fi, (char *) ptr, len)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
192 #define XLIKE_TEXT_WIDTH_WIDE(fi, ptr, len) XTextWidth16 (fi, (XChar2b *) ptr, len)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
193
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
194 #define XLIKE_DISPLAY_LINE_HEIGHT(dl) DISPLAY_LINE_HEIGHT (dl)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
195 #define XLIKE_DISPLAY_LINE_YPOS(dl) DISPLAY_LINE_YPOS (dl)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
196 #define XLIKE_DISPLAY_LINE_TOP_CLIP(dl) ((dl)->top_clip)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
197 #define XLIKE_SET_CLIP_RECTANGLE(dpy, gc, xorig, yorig, prect) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
198 /* #### why not Unsorted? */ \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
199 XSetClipRectangles (dpy, gc, xorig, yorig, prect, 1, YXBanded)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
200 #define XLIKE_CLEAR_CLIP_MASK(dpy, gc) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
201 do \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
202 { \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
203 XSetClipMask (dpy, gc, None); \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
204 XSetClipOrigin (dpy, gc, 0, 0); \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
205 } \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
206 while (0)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
207 #define XLIKE_FLUSH(dpy) XSync (dpy, False)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
208 #define XLIKE_CLEAR_AREA(dpy, win, x, y, width, height) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
209 XClearArea (dpy, win, x, y, width, height, False)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
210
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
211 #define IMAGE_INSTANCE_XLIKE_MASK IMAGE_INSTANCE_X_MASK
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
212 #define XIMAGE_INSTANCE_XLIKE_PIXMAP XIMAGE_INSTANCE_X_PIXMAP
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
213 #define COLOR_INSTANCE_XLIKE_COLOR COLOR_INSTANCE_X_COLOR
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
214 #define FONT_INSTANCE_XLIKE_FONT FONT_INSTANCE_X_FONT
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
215 #define DEVICE_XLIKE_GC_CACHE DEVICE_X_GC_CACHE
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
216 #define DEVICE_XLIKE_GRAY_PIXMAP DEVICE_X_GRAY_PIXMAP
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
217 #define XLIKE_SET_GC_FILL(gc, style) ((gc).fill_style = (style))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
218 #define XLIKE_COLOR_TO_PIXEL(c) ((c).pixel)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
219 #define XLIKE_SET_GC_COLOR(lval, rval) ((lval) = (rval).pixel)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
220 #define XLIKE_SET_GC_PIXEL(lval, rval) ((lval) = (rval))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
221 #define XLIKE_FONT_NUM(val) ((val)->fid)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
222
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
223 /************ End X flavor of XLIKE **********/
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
224
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
225
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
226 #else /* THIS_IS_GTK */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
227
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
228 /***************************************************************************/
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
229 /* Definitions implementing GTK flavor of XLIKE */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
230 /***************************************************************************/
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
231
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
232 #define XLIKE_NAME gtk
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
233 #define USED_IF_X(var) UNUSED (var)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
234 #define USED_IF_GTK(var) var
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
235
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
236 /*types */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
237 typedef void * XLIKE_DISPLAY;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
238 typedef GdkWindow * XLIKE_WINDOW;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
239 typedef GdkGC * XLIKE_GC;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
240 typedef GdkRectangle XLIKE_RECTANGLE;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
241 typedef GdkGCValues XLIKE_GCVALUES;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
242 typedef GdkColor XLIKE_COLOR;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
243 typedef gulong XLIKE_PIXEL;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
244
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
245 /* constants */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
246 #define XLIKE_NONE 0
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
247 #define XLIKE_FALSE FALSE
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
248
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
249 #define XLIKE_GC_BACKGROUND GDK_GC_BACKGROUND
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
250 #define XLIKE_GC_CLIP_MASK GDK_GC_CLIP_MASK
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
251 #define XLIKE_GC_CLIP_X_ORIGIN GDK_GC_CLIP_X_ORIGIN
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
252 #define XLIKE_GC_CLIP_Y_ORIGIN GDK_GC_CLIP_Y_ORIGIN
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
253 #define XLIKE_GC_EXPOSURES GDK_GC_EXPOSURES
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
254 #define XLIKE_GC_FILL GDK_GC_FILL
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
255 #define XLIKE_GC_FONT GDK_GC_FONT
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
256 #define XLIKE_GC_FOREGROUND GDK_GC_FOREGROUND
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
257 #define XLIKE_GC_FUNCTION GDK_GC_FUNCTION
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
258 #define XLIKE_GC_LINE_WIDTH GDK_GC_LINE_WIDTH
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
259 #define XLIKE_GC_STIPPLE GDK_GC_STIPPLE
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
260 #define XLIKE_GC_TILE GDK_GC_TILE
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
261
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
262 #define XLIKE_GX_COPY GDK_COPY
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
263 #define XLIKE_GX_XOR GDK_XOR
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
264
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
265 #define XLIKE_FILL_STIPPLED GDK_STIPPLED
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
266 #define XLIKE_FILL_OPAQUE_STIPPLED GDK_OPAQUE_STIPPLED
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
267 #define XLIKE_FILL_TILED GDK_TILED
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
268 #define XLIKE_FILL_SOLID GDK_SOLID
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
269
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
270 /* functions */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
271
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
272 /* Avoid unused-variable warning involving D */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
273 #define GET_XLIKE_DISPLAY(d) (USED (d), NULL)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
274 #define GET_XLIKE_X_DISPLAY(d) (USED (d), GDK_DISPLAY ())
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
275 #define GET_XLIKE_WINDOW(w) GET_GTK_WIDGET_WINDOW (FRAME_GTK_TEXT_WIDGET (w))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
276 #define XLIKE_FILL_RECTANGLE(dpy, x_win, gc, x, y, width, height) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
277 (USED (dpy), gdk_draw_rectangle (GDK_DRAWABLE (x_win), gc, TRUE, \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
278 x, y, width, height))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
279 #define XLIKE_DRAW_RECTANGLE(dpy, x_win, gc, x, y, width, height) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
280 (USED (dpy), gdk_draw_rectangle (GDK_DRAWABLE (x_win), gc, FALSE, \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
281 x, y, width, height))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
282 #define XLIKE_DRAW_LINE(dpy, x_win, gc, x1, y1, x2, y2) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
283 (USED (dpy), gdk_draw_line (GDK_DRAWABLE (x_win), gc, x1, y1, x2, y2))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
284 #define XLIKE_TEXT_WIDTH(fi, ptr, len) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
285 gdk_text_width (fi, (char *) ptr, len)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
286 #define XLIKE_TEXT_WIDTH_WIDE(fi, ptr, len) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
287 gdk_text_width_wc (fi, (GdkWChar *) ptr, len)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
288
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
289 /* FIXME: This is totally bogus. It removes dl->top_clip from the
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
290 equations. If there is a bug involving this, fix it properly!
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
291 Or just ensure that top_clip is 0. */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
292 #define XLIKE_DISPLAY_LINE_HEIGHT(dl) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
293 ((dl)->ascent + (dl)->descent - (dl)->clip)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
294 #define XLIKE_DISPLAY_LINE_YPOS(dl) ((dl)->ypos - (dl)->ascent)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
295 #define XLIKE_DISPLAY_LINE_TOP_CLIP(dl) (0)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
296 #define XLIKE_SET_CLIP_RECTANGLE(dpy, gc, xorig, yorig, prect) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
297 do \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
298 { \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
299 USED (dpy); \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
300 gdk_gc_set_clip_rectangle (gc, prect); \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
301 gdk_gc_set_clip_origin (gc, xorig, yorig); \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
302 } \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
303 while (0)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
304 #define XLIKE_CLEAR_CLIP_MASK(dpy, gc) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
305 do \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
306 { \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
307 USED (dpy); \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
308 gdk_gc_set_clip_rectangle (gc, NULL); \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
309 gdk_gc_set_clip_origin (gc, 0, 0); \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
310 } \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
311 while (0)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
312 #define XLIKE_FLUSH(dpy) gdk_flush ()
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
313 #define XLIKE_CLEAR_AREA(dpy, win, x, y, width, height) \
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
314 (USED (dpy), gdk_window_clear_area (win, x, y, width, height))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
315
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
316 #define IMAGE_INSTANCE_XLIKE_MASK IMAGE_INSTANCE_GTK_MASK
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
317 #define XIMAGE_INSTANCE_XLIKE_PIXMAP XIMAGE_INSTANCE_GTK_PIXMAP
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
318 #define COLOR_INSTANCE_XLIKE_COLOR(ci) (*COLOR_INSTANCE_GTK_COLOR (ci))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
319 #define FONT_INSTANCE_XLIKE_FONT FONT_INSTANCE_GTK_FONT
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
320 #define DEVICE_XLIKE_GRAY_PIXMAP DEVICE_GTK_GRAY_PIXMAP
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
321 #define DEVICE_XLIKE_GC_CACHE DEVICE_GTK_GC_CACHE
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
322 #define XLIKE_SET_GC_FILL(gc, style) ((gc).fill = (style))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
323 #define XLIKE_COLOR_TO_PIXEL(c) ((c).pixel)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
324 #define XLIKE_SET_GC_COLOR(lval, rval) ((lval) = (rval))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
325 #define XLIKE_SET_GC_PIXEL(lval, rval) ((lval).pixel = (rval))
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
326 #define XLIKE_FONT_NUM(val) (val)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
327
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
328 /************ End GTK flavor of XLIKE **********/
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
329
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
330 #endif /* (not) THIS_IS_X */
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
331
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
332
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents:
diff changeset
333 #endif /* INCLUDED_console_xlike_inc_h_ */