diff options
| author | Fred Pierresteguy | 1994-03-11 10:36:17 +0000 |
|---|---|---|
| committer | Fred Pierresteguy | 1994-03-11 10:36:17 +0000 |
| commit | 9331cca8ba2f434bcbd468d14efbd5acf7426880 (patch) | |
| tree | f7e499b52a6be353397fcfb2044e59931b3d2d0d | |
| parent | e5c001e3a2b9d8984301e10e3b7c02227ae325da (diff) | |
| download | emacs-9331cca8ba2f434bcbd468d14efbd5acf7426880.tar.gz emacs-9331cca8ba2f434bcbd468d14efbd5acf7426880.zip | |
*** empty log message ***
| -rw-r--r-- | lwlib/lwlib.c | 65 |
1 files changed, 58 insertions, 7 deletions
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index 1f858cbea3d..996238cc37a 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c | |||
| @@ -35,11 +35,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 35 | #define alloca __builtin_alloca | 35 | #define alloca __builtin_alloca |
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | #if ((!__GNUC__) && !defined(__hpux)) && !defined(AIXV3) | 38 | #if ((!__GNUC__) && !defined(__hpux)) && !defined(_AIX) |
| 39 | #include <alloca.h> | 39 | #include <alloca.h> |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | #if defined(AIXV3) | 42 | #if defined(_AIX) |
| 43 | #pragma alloca | 43 | #pragma alloca |
| 44 | #endif | 44 | #endif |
| 45 | 45 | ||
| @@ -52,6 +52,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 52 | #if defined (USE_OLIT) | 52 | #if defined (USE_OLIT) |
| 53 | #include "lwlib-Xol.h" | 53 | #include "lwlib-Xol.h" |
| 54 | #endif | 54 | #endif |
| 55 | #if defined (USE_XAW) | ||
| 56 | #include "lwlib-Xaw.h" | ||
| 57 | #endif | ||
| 55 | 58 | ||
| 56 | #if !defined (USE_LUCID) && !defined (USE_MOTIF) && !defined (USE_OLIT) | 59 | #if !defined (USE_LUCID) && !defined (USE_MOTIF) && !defined (USE_OLIT) |
| 57 | ERROR! At least one of USE_LUCID, USE_MOTIF or USE_OLIT must be defined. | 60 | ERROR! At least one of USE_LUCID, USE_MOTIF or USE_OLIT must be defined. |
| @@ -321,6 +324,14 @@ get_widget_info (id, remove_p) | |||
| 321 | return NULL; | 324 | return NULL; |
| 322 | } | 325 | } |
| 323 | 326 | ||
| 327 | /* Internal function used by the library dependent implementation to get the | ||
| 328 | widget_value for a given widget in an instance */ | ||
| 329 | widget_info * | ||
| 330 | lw_get_widget_info (LWLIB_ID id) | ||
| 331 | { | ||
| 332 | return get_widget_info (id, 0); | ||
| 333 | } | ||
| 334 | |||
| 324 | static widget_instance * | 335 | static widget_instance * |
| 325 | get_widget_instance (widget, remove_p) | 336 | get_widget_instance (widget, remove_p) |
| 326 | Widget widget; | 337 | Widget widget; |
| @@ -573,6 +584,10 @@ set_one_value (instance, val, deep_p) | |||
| 573 | if (lw_olit_widget_p (instance->widget)) | 584 | if (lw_olit_widget_p (instance->widget)) |
| 574 | xol_update_one_widget (instance, widget, val, deep_p); | 585 | xol_update_one_widget (instance, widget, val, deep_p); |
| 575 | #endif | 586 | #endif |
| 587 | #if defined (USE_XAW) | ||
| 588 | if (lw_xaw_widget_p (instance->widget)) | ||
| 589 | xaw_update_one_widget (instance, widget, val, deep_p); | ||
| 590 | #endif | ||
| 576 | } | 591 | } |
| 577 | } | 592 | } |
| 578 | 593 | ||
| @@ -741,6 +756,10 @@ instanciate_widget_instance (instance) | |||
| 741 | if (!function) | 756 | if (!function) |
| 742 | function = find_in_table (instance->info->type, xol_creation_table); | 757 | function = find_in_table (instance->info->type, xol_creation_table); |
| 743 | #endif | 758 | #endif |
| 759 | #if defined (USE_XAW) | ||
| 760 | if (!function) | ||
| 761 | function = find_in_table (instance->info->type, xaw_creation_table); | ||
| 762 | #endif | ||
| 744 | 763 | ||
| 745 | if (!function) | 764 | if (!function) |
| 746 | { | 765 | { |
| @@ -753,6 +772,10 @@ instanciate_widget_instance (instance) | |||
| 753 | if (!function) | 772 | if (!function) |
| 754 | function = xm_create_dialog; | 773 | function = xm_create_dialog; |
| 755 | #endif | 774 | #endif |
| 775 | #if defined (USE_XAW) | ||
| 776 | if (!function) | ||
| 777 | function = xaw_create_dialog; | ||
| 778 | #endif | ||
| 756 | #if defined (USE_OLIT) | 779 | #if defined (USE_OLIT) |
| 757 | /* not yet */ | 780 | /* not yet */ |
| 758 | #endif | 781 | #endif |
| @@ -879,6 +902,11 @@ destroy_one_instance (instance) | |||
| 879 | xol_destroy_instance (instance); | 902 | xol_destroy_instance (instance); |
| 880 | else | 903 | else |
| 881 | #endif | 904 | #endif |
| 905 | #if defined (USE_XAW) | ||
| 906 | if (lw_xaw_widget_p (instance->widget)) | ||
| 907 | xaw_destroy_instance (instance); | ||
| 908 | else | ||
| 909 | #endif | ||
| 882 | /* do not remove the empty statement */ | 910 | /* do not remove the empty statement */ |
| 883 | ; | 911 | ; |
| 884 | } | 912 | } |
| @@ -995,19 +1023,34 @@ lw_pop_all_widgets (id, up) | |||
| 995 | for (instance = info->instances; instance; instance = instance->next) | 1023 | for (instance = info->instances; instance; instance = instance->next) |
| 996 | if (instance->pop_up_p && instance->widget) | 1024 | if (instance->pop_up_p && instance->widget) |
| 997 | { | 1025 | { |
| 998 | if (!XtIsRealized (instance->widget)) | ||
| 999 | XtRealizeWidget (instance->widget); | ||
| 1000 | #if defined (USE_LUCID) | 1026 | #if defined (USE_LUCID) |
| 1001 | if (lw_lucid_widget_p (instance->widget)) | 1027 | if (lw_lucid_widget_p (instance->widget)) |
| 1002 | xlw_pop_instance (instance, up); | 1028 | { |
| 1029 | XtRealizeWidget (instance->widget); | ||
| 1030 | xlw_pop_instance (instance, up); | ||
| 1031 | } | ||
| 1003 | #endif | 1032 | #endif |
| 1004 | #if defined (USE_MOTIF) | 1033 | #if defined (USE_MOTIF) |
| 1005 | if (lw_motif_widget_p (instance->widget)) | 1034 | if (lw_motif_widget_p (instance->widget)) |
| 1006 | xm_pop_instance (instance, up); | 1035 | { |
| 1036 | XtRealizeWidget (instance->widget); | ||
| 1037 | xm_pop_instance (instance, up); | ||
| 1038 | } | ||
| 1007 | #endif | 1039 | #endif |
| 1008 | #if defined (USE_OLIT) | 1040 | #if defined (USE_OLIT) |
| 1009 | if (lw_olit_widget_p (instance->widget)) | 1041 | if (lw_olit_widget_p (instance->widget)) |
| 1010 | xol_pop_instance (instance, up); | 1042 | { |
| 1043 | XtRealizeWidget (instance->widget); | ||
| 1044 | xol_pop_instance (instance, up); | ||
| 1045 | } | ||
| 1046 | #endif | ||
| 1047 | #if defined (USE_XAW) | ||
| 1048 | if (lw_xaw_widget_p (instance->widget)) | ||
| 1049 | { | ||
| 1050 | XtRealizeWidget (XtParent (instance->widget)); | ||
| 1051 | XtRealizeWidget (instance->widget); | ||
| 1052 | xaw_pop_instance (instance, up); | ||
| 1053 | } | ||
| 1011 | #endif | 1054 | #endif |
| 1012 | } | 1055 | } |
| 1013 | } | 1056 | } |
| @@ -1042,6 +1085,10 @@ lw_popup_menu (widget) | |||
| 1042 | if (lw_olit_widget_p (widget)) | 1085 | if (lw_olit_widget_p (widget)) |
| 1043 | xol_popup_menu (widget); | 1086 | xol_popup_menu (widget); |
| 1044 | #endif | 1087 | #endif |
| 1088 | #if defined (USE_XAW) | ||
| 1089 | if (lw_xaw_widget_p (widget)) | ||
| 1090 | xaw_popup_menu (widget); | ||
| 1091 | #endif | ||
| 1045 | } | 1092 | } |
| 1046 | 1093 | ||
| 1047 | /* get the values back */ | 1094 | /* get the values back */ |
| @@ -1066,6 +1113,10 @@ get_one_value (instance, val) | |||
| 1066 | if (lw_olit_widget_p (instance->widget)) | 1113 | if (lw_olit_widget_p (instance->widget)) |
| 1067 | xol_update_one_value (instance, widget, val); | 1114 | xol_update_one_value (instance, widget, val); |
| 1068 | #endif | 1115 | #endif |
| 1116 | #if defined (USE_XAW) | ||
| 1117 | if (lw_xaw_widget_p (instance->widget)) | ||
| 1118 | xaw_update_one_value (instance, widget, val); | ||
| 1119 | #endif | ||
| 1069 | return True; | 1120 | return True; |
| 1070 | } | 1121 | } |
| 1071 | else | 1122 | else |