comparison src/glyphs-x.c @ 4521:383ab474a241

Fix docstring typo.
author Stephen J. Turnbull <stephen@xemacs.org>
date Tue, 28 Oct 2008 10:38:26 +0900
parents 8475ff9c49ea
children fc7067b7f407
comparison
equal deleted inserted replaced
4520:279cadceaa13 4521:383ab474a241
2232 2232
2233 /* Adjust offsets within the frame. */ 2233 /* Adjust offsets within the frame. */
2234 if (XFRAME (IMAGE_INSTANCE_FRAME (p))->size_changed) 2234 if (XFRAME (IMAGE_INSTANCE_FRAME (p))->size_changed)
2235 { 2235 {
2236 Arg al[2]; 2236 Arg al[2];
2237 XtSetArg (al [0], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (p)); 2237 Xt_SET_ARG (al [0], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (p));
2238 XtSetArg (al [1], XtNy, &IMAGE_INSTANCE_X_WIDGET_YOFFSET (p)); 2238 Xt_SET_ARG (al [1], XtNy, &IMAGE_INSTANCE_X_WIDGET_YOFFSET (p));
2239 XtGetValues (FRAME_X_TEXT_WIDGET 2239 XtGetValues (FRAME_X_TEXT_WIDGET
2240 (XFRAME (IMAGE_INSTANCE_FRAME (p))), al, 2); 2240 (XFRAME (IMAGE_INSTANCE_FRAME (p))), al, 2);
2241 } 2241 }
2242 2242
2243 /* now modify the widget */ 2243 /* now modify the widget */
2422 /* Give each child label the correct foreground color. */ 2422 /* Give each child label the correct foreground color. */
2423 Lisp_Object pixel = FACE_FOREGROUND 2423 Lisp_Object pixel = FACE_FOREGROUND
2424 (IMAGE_INSTANCE_WIDGET_FACE (ii), 2424 (IMAGE_INSTANCE_WIDGET_FACE (ii),
2425 domain); 2425 domain);
2426 XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel)); 2426 XColor fcolor = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (pixel));
2427 lw_add_widget_value_arg (val, XtNtabForeground, fcolor.pixel); 2427 lw_add_widget_value_arg (val, (String) XtNtabForeground, fcolor.pixel);
2428 wv->change = VISIBLE_CHANGE; 2428 wv->change = VISIBLE_CHANGE;
2429 val->change = VISIBLE_CHANGE; 2429 val->change = VISIBLE_CHANGE;
2430 2430
2431 for (cur = val->next; cur; cur = cur->next) 2431 for (cur = val->next; cur; cur = cur->next)
2432 { 2432 {
2537 IMAGE_INSTANCE_X_WIDGET_LWID (ii) = id; 2537 IMAGE_INSTANCE_X_WIDGET_LWID (ii) = id;
2538 /* because the EmacsManager is the widgets parent we have to 2538 /* because the EmacsManager is the widgets parent we have to
2539 offset the redisplay of the widget by the amount the text 2539 offset the redisplay of the widget by the amount the text
2540 widget is inside the manager. */ 2540 widget is inside the manager. */
2541 ac = 0; 2541 ac = 0;
2542 XtSetArg (al [ac], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (ii)); ac++; 2542 Xt_SET_ARG (al [ac], XtNx, &IMAGE_INSTANCE_X_WIDGET_XOFFSET (ii)); ac++;
2543 XtSetArg (al [ac], XtNy, &IMAGE_INSTANCE_X_WIDGET_YOFFSET (ii)); ac++; 2543 Xt_SET_ARG (al [ac], XtNy, &IMAGE_INSTANCE_X_WIDGET_YOFFSET (ii)); ac++;
2544 XtGetValues (FRAME_X_TEXT_WIDGET (f), al, ac); 2544 XtGetValues (FRAME_X_TEXT_WIDGET (f), al, ac);
2545 2545
2546 XtSetMappedWhenManaged (wid, TRUE); 2546 XtSetMappedWhenManaged (wid, TRUE);
2547 2547
2548 free_widget_value_tree (wv); 2548 free_widget_value_tree (wv);
2606 && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (glyph))) 2606 && IMAGE_INSTANCE_PIXMAP_TYPE_P (XIMAGE_INSTANCE (glyph)))
2607 { 2607 {
2608 Arg al [2]; 2608 Arg al [2];
2609 int ac =0; 2609 int ac =0;
2610 #ifdef LWLIB_WIDGETS_MOTIF 2610 #ifdef LWLIB_WIDGETS_MOTIF
2611 XtSetArg (al [ac], XmNlabelType, XmPIXMAP); ac++; 2611 Xt_SET_ARG (al [ac], XmNlabelType, XmPIXMAP); ac++;
2612 XtSetArg (al [ac], XmNlabelPixmap, XIMAGE_INSTANCE_X_PIXMAP (glyph)); 2612 Xt_SET_ARG (al [ac], XmNlabelPixmap, XIMAGE_INSTANCE_X_PIXMAP (glyph));
2613 ac++; 2613 ac++;
2614 #else 2614 #else
2615 XtSetArg (al [ac], XtNpixmap, XIMAGE_INSTANCE_X_PIXMAP (glyph)); ac++; 2615 Xt_SET_ARG (al [ac], XtNpixmap, XIMAGE_INSTANCE_X_PIXMAP (glyph)); ac++;
2616 #endif 2616 #endif
2617 XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, ac); 2617 XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, ac);
2618 } 2618 }
2619 } 2619 }
2620 2620
2681 { 2681 {
2682 Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); 2682 Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance);
2683 2683
2684 if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p)) 2684 if (IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (p))
2685 { 2685 {
2686 Arg al [1];
2687 Lisp_Object val; 2686 Lisp_Object val;
2688 val = XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p))->value; 2687 val = XGUI_ITEM (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (p))->value;
2689 XtSetArg (al[0], XtNvalue, XINT (val)); 2688 Xt_SET_VALUE (IMAGE_INSTANCE_X_WIDGET_ID (p), XtNvalue, XINT (val));
2690 XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (p), al, 1);
2691 } 2689 }
2692 } 2690 }
2693 2691
2694 /* instantiate an edit control */ 2692 /* instantiate an edit control */
2695 static void 2693 static void
2771 /* There may be an encapsulated way of doing this, 2769 /* There may be an encapsulated way of doing this,
2772 but I couldn't find it. */ 2770 but I couldn't find it. */
2773 Lisp_Object old_selected = 2771 Lisp_Object old_selected =
2774 gui_item_list_find_selected 2772 gui_item_list_find_selected
2775 (XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii))); 2773 (XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)));
2776 Arg al [1];
2777 char* name; 2774 char* name;
2778 unsigned int num_children, i; 2775 unsigned int num_children, i;
2779 Widget* children; 2776 Widget* children;
2780 2777
2781 LISP_STRING_TO_EXTERNAL (XGUI_ITEM (XCAR (rest))->name, 2778 LISP_STRING_TO_EXTERNAL (XGUI_ITEM (XCAR (rest))->name,
2787 &num_children); 2784 &num_children);
2788 for (i = 0; i < num_children; i++) 2785 for (i = 0; i < num_children; i++)
2789 { 2786 {
2790 if (!strcmp (XtName (children [i]), name)) 2787 if (!strcmp (XtName (children [i]), name))
2791 { 2788 {
2792 XtSetArg (al [0], XtNtopWidget, children [i]); 2789 Xt_SET_VALUE (IMAGE_INSTANCE_X_WIDGET_ID (ii),
2793 XtSetValues (IMAGE_INSTANCE_X_WIDGET_ID (ii), al, 1); 2790 XtNtopWidget, children [i]);
2794 break; 2791 break;
2795 } 2792 }
2796 } 2793 }
2797 /* Pick up the new selected item. */ 2794 /* Pick up the new selected item. */
2798 XGUI_ITEM (old_selected)->selected = 2795 XGUI_ITEM (old_selected)->selected =