diff options
| author | Richard M. Stallman | 1994-01-30 03:17:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-30 03:17:32 +0000 |
| commit | 01492d1b7c916d117bce7d634243f2132437f270 (patch) | |
| tree | 9ee380741008da3893978a0b7de6a13c9822a39d | |
| parent | cdee26965a38e6ae869655ee5dd76524586f4c24 (diff) | |
| download | emacs-01492d1b7c916d117bce7d634243f2132437f270.tar.gz emacs-01492d1b7c916d117bce7d634243f2132437f270.zip | |
*** empty log message ***
| -rw-r--r-- | lwlib/lwlib-int.h | 7 | ||||
| -rw-r--r-- | lwlib/lwlib.c | 2 | ||||
| -rw-r--r-- | lwlib/lwlib.h | 47 | ||||
| -rw-r--r-- | src/widget.c | 31 |
4 files changed, 42 insertions, 45 deletions
diff --git a/lwlib/lwlib-int.h b/lwlib/lwlib-int.h index 0f2c594e7de..3c8534f7ef2 100644 --- a/lwlib/lwlib-int.h +++ b/lwlib/lwlib-int.h | |||
| @@ -32,7 +32,7 @@ typedef struct _widget_info | |||
| 32 | } widget_info; | 32 | } widget_info; |
| 33 | 33 | ||
| 34 | typedef Widget | 34 | typedef Widget |
| 35 | (*widget_creation_function) (widget_instance* instance); | 35 | (*widget_creation_function) (); |
| 36 | 36 | ||
| 37 | typedef struct _widget_creation_entry | 37 | typedef struct _widget_creation_entry |
| 38 | { | 38 | { |
| @@ -43,12 +43,11 @@ typedef struct _widget_creation_entry | |||
| 43 | /* update all other instances of a widget. Can be used in a callback when | 43 | /* update all other instances of a widget. Can be used in a callback when |
| 44 | a wiget has been used by the user */ | 44 | a wiget has been used by the user */ |
| 45 | void | 45 | void |
| 46 | lw_internal_update_other_instances (Widget widget, XtPointer closure, | 46 | lw_internal_update_other_instances (); |
| 47 | XtPointer call_data); | ||
| 48 | 47 | ||
| 49 | /* get the widget_value for a widget in a given instance */ | 48 | /* get the widget_value for a widget in a given instance */ |
| 50 | widget_value* | 49 | widget_value* |
| 51 | lw_get_widget_value_for_widget (widget_instance* instance, Widget w); | 50 | lw_get_widget_value_for_widget (); |
| 52 | 51 | ||
| 53 | #endif /* LWLIB_INTERNAL_H */ | 52 | #endif /* LWLIB_INTERNAL_H */ |
| 54 | 53 | ||
diff --git a/lwlib/lwlib.c b/lwlib/lwlib.c index f9727b991a5..21ca8987f7b 100644 --- a/lwlib/lwlib.c +++ b/lwlib/lwlib.c | |||
| @@ -26,9 +26,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 26 | #include <sys/types.h> | 26 | #include <sys/types.h> |
| 27 | #include <string.h> | 27 | #include <string.h> |
| 28 | #include <stdio.h> | 28 | #include <stdio.h> |
| 29 | #include <X11/StringDefs.h> | ||
| 30 | #include "lwlib-int.h" | 29 | #include "lwlib-int.h" |
| 31 | #include "lwlib-utils.h" | 30 | #include "lwlib-utils.h" |
| 31 | #include <X11/StringDefs.h> | ||
| 32 | 32 | ||
| 33 | #if defined(__GNUC__) && !defined(alloca) | 33 | #if defined(__GNUC__) && !defined(alloca) |
| 34 | #define alloca __builtin_alloca | 34 | #define alloca __builtin_alloca |
diff --git a/lwlib/lwlib.h b/lwlib/lwlib.h index 195bbb5df8b..f52e257bd7a 100644 --- a/lwlib/lwlib.h +++ b/lwlib/lwlib.h | |||
| @@ -66,38 +66,31 @@ typedef struct _widget_value | |||
| 66 | } widget_value; | 66 | } widget_value; |
| 67 | 67 | ||
| 68 | 68 | ||
| 69 | typedef void (*lw_callback) (Widget w, LWLIB_ID id, void* data); | 69 | typedef void (*lw_callback) (); |
| 70 | 70 | ||
| 71 | void lw_register_widget (char* type, char* name, LWLIB_ID id, | 71 | void lw_register_widget (); |
| 72 | widget_value* val, lw_callback pre_activate_cb, | 72 | Widget lw_get_widget (); |
| 73 | lw_callback selection_cb, | 73 | Widget lw_make_widget (); |
| 74 | lw_callback post_activate_cb); | 74 | Widget lw_create_widget (); |
| 75 | Widget lw_get_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p); | 75 | LWLIB_ID lw_get_widget_id (); |
| 76 | Widget lw_make_widget (LWLIB_ID id, Widget parent, Boolean pop_up_p); | 76 | void lw_modify_all_widgets (); |
| 77 | Widget lw_create_widget (char* type, char* name, LWLIB_ID id, | 77 | void lw_destroy_widget (); |
| 78 | widget_value* val, Widget parent, Boolean pop_up_p, | 78 | void lw_destroy_all_widgets (); |
| 79 | lw_callback pre_activate_cb, | 79 | void lw_destroy_everything (); |
| 80 | lw_callback selection_cb, | 80 | void lw_destroy_all_pop_ups (); |
| 81 | lw_callback post_activate_cb); | 81 | Widget lw_raise_all_pop_up_widgets (); |
| 82 | LWLIB_ID lw_get_widget_id (Widget w); | 82 | widget_value* lw_get_all_values (); |
| 83 | void lw_modify_all_widgets (LWLIB_ID id, widget_value* val, Boolean deep_p); | 83 | Boolean lw_get_some_values (); |
| 84 | void lw_destroy_widget (Widget w); | 84 | void lw_pop_up_all_widgets (); |
| 85 | void lw_destroy_all_widgets (LWLIB_ID id); | 85 | void lw_pop_down_all_widgets (); |
| 86 | void lw_destroy_everything (void); | ||
| 87 | void lw_destroy_all_pop_ups (void); | ||
| 88 | Widget lw_raise_all_pop_up_widgets (void); | ||
| 89 | widget_value* lw_get_all_values (LWLIB_ID id); | ||
| 90 | Boolean lw_get_some_values (LWLIB_ID id, widget_value* val); | ||
| 91 | void lw_pop_up_all_widgets (LWLIB_ID id); | ||
| 92 | void lw_pop_down_all_widgets (LWLIB_ID id); | ||
| 93 | widget_value *malloc_widget_value (); | 86 | widget_value *malloc_widget_value (); |
| 94 | void free_widget_value (widget_value *); | 87 | void free_widget_value (); |
| 95 | void lw_popup_menu (Widget); | 88 | void lw_popup_menu (); |
| 96 | 89 | ||
| 97 | /* Toolkit independent way of focusing on a Widget at the Xt level. */ | 90 | /* Toolkit independent way of focusing on a Widget at the Xt level. */ |
| 98 | void lw_set_keyboard_focus (Widget parent, Widget w); | 91 | void lw_set_keyboard_focus (); |
| 99 | 92 | ||
| 100 | /* Silly Energize hack to invert the "sheet" button */ | 93 | /* Silly Energize hack to invert the "sheet" button */ |
| 101 | void lw_show_busy (Widget w, Boolean busy); | 94 | void lw_show_busy (); |
| 102 | 95 | ||
| 103 | #endif /* LWLIB_H */ | 96 | #endif /* LWLIB_H */ |
diff --git a/src/widget.c b/src/widget.c index e5092b1eb73..e93fbaf5c6b 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -58,14 +58,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 58 | #define DEFAULT_FACE_FONT "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" | 58 | #define DEFAULT_FACE_FONT "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*" |
| 59 | 59 | ||
| 60 | 60 | ||
| 61 | static void EmacsFrameInitialize (Widget, Widget, ArgList, Cardinal *); | 61 | static void EmacsFrameInitialize (/*Widget, Widget, ArgList, Cardinal * */); |
| 62 | static void EmacsFrameDestroy (Widget); | 62 | static void EmacsFrameDestroy (/* Widget */); |
| 63 | static void EmacsFrameRealize (Widget, XtValueMask*, XSetWindowAttributes*); | 63 | static void EmacsFrameRealize (/* Widget, XtValueMask*, XSetWindowAttributes* */); |
| 64 | void EmacsFrameResize (Widget widget); | 64 | void EmacsFrameResize (/* Widget widget */); |
| 65 | static Boolean EmacsFrameSetValues (Widget, Widget, Widget, | 65 | static Boolean EmacsFrameSetValues (/* Widget, Widget, Widget, |
| 66 | ArgList, Cardinal *); | 66 | ArgList, Cardinal * */); |
| 67 | static XtGeometryResult EmacsFrameQueryGeometry (Widget, XtWidgetGeometry*, | 67 | static XtGeometryResult EmacsFrameQueryGeometry (/* Widget, XtWidgetGeometry*, |
| 68 | XtWidgetGeometry*); | 68 | XtWidgetGeometry* */); |
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | #undef XtOffset | 71 | #undef XtOffset |
| @@ -162,8 +162,10 @@ EmacsFrameClassRec emacsFrameClassRec = { | |||
| 162 | WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec; | 162 | WidgetClass emacsFrameClass = (WidgetClass) &emacsFrameClassRec; |
| 163 | 163 | ||
| 164 | static void | 164 | static void |
| 165 | get_default_char_pixel_size (EmacsFrame ew, int* pixel_width, | 165 | get_default_char_pixel_size (ew, pixel_width, pixel_height) |
| 166 | int* pixel_height) | 166 | EmacsFrame ew; |
| 167 | int* pixel_width; | ||
| 168 | int* pixel_height; | ||
| 167 | { | 169 | { |
| 168 | /* | 170 | /* |
| 169 | *pixel_width = XTextWidth (ew->emacs_frame.font, "n", 1); | 171 | *pixel_width = XTextWidth (ew->emacs_frame.font, "n", 1); |
| @@ -176,9 +178,12 @@ get_default_char_pixel_size (EmacsFrame ew, int* pixel_width, | |||
| 176 | } | 178 | } |
| 177 | 179 | ||
| 178 | static void | 180 | static void |
| 179 | pixel_to_char_size (EmacsFrame ew, | 181 | pixel_to_char_size (ew, pixel_width, pixel_height, char_width, char_height) |
| 180 | Dimension pixel_width, Dimension pixel_height, | 182 | EmacsFrame ew; |
| 181 | int* char_width, int* char_height) | 183 | Dimension pixel_width; |
| 184 | Dimension pixel_height; | ||
| 185 | int* char_width; | ||
| 186 | int* char_height; | ||
| 182 | { | 187 | { |
| 183 | struct frame* f = ew->emacs_frame.frame; | 188 | struct frame* f = ew->emacs_frame.frame; |
| 184 | *char_width = PIXEL_TO_CHAR_WIDTH (f, pixel_width); | 189 | *char_width = PIXEL_TO_CHAR_WIDTH (f, pixel_width); |