Mercurial > hg > xemacs-beta
comparison src/glyphs-gtk.c @ 2286:04bc9d2f42c7
[xemacs-hg @ 2004-09-20 19:18:55 by james]
Mark all unused parameters as unused. Also eliminate some unneeded local
variables.
author | james |
---|---|
date | Mon, 20 Sep 2004 19:20:08 +0000 |
parents | 4ec724310f33 |
children | ecf1ebac70d8 |
comparison
equal
deleted
inserted
replaced
2285:914c5afaac33 | 2286:04bc9d2f42c7 |
---|---|
348 } | 348 } |
349 | 349 |
350 static void | 350 static void |
351 gtk_print_image_instance (struct Lisp_Image_Instance *p, | 351 gtk_print_image_instance (struct Lisp_Image_Instance *p, |
352 Lisp_Object printcharfun, | 352 Lisp_Object printcharfun, |
353 int escapeflag) | 353 int UNUSED (escapeflag)) |
354 { | 354 { |
355 switch (IMAGE_INSTANCE_TYPE (p)) | 355 switch (IMAGE_INSTANCE_TYPE (p)) |
356 { | 356 { |
357 case IMAGE_MONO_PIXMAP: | 357 case IMAGE_MONO_PIXMAP: |
358 case IMAGE_COLOR_PIXMAP: | 358 case IMAGE_COLOR_PIXMAP: |
458 p->data = 0; | 458 p->data = 0; |
459 } | 459 } |
460 | 460 |
461 static int | 461 static int |
462 gtk_image_instance_equal (struct Lisp_Image_Instance *p1, | 462 gtk_image_instance_equal (struct Lisp_Image_Instance *p1, |
463 struct Lisp_Image_Instance *p2, int depth) | 463 struct Lisp_Image_Instance *p2, int UNUSED (depth)) |
464 { | 464 { |
465 switch (IMAGE_INSTANCE_TYPE (p1)) | 465 switch (IMAGE_INSTANCE_TYPE (p1)) |
466 { | 466 { |
467 case IMAGE_MONO_PIXMAP: | 467 case IMAGE_MONO_PIXMAP: |
468 case IMAGE_COLOR_PIXMAP: | 468 case IMAGE_COLOR_PIXMAP: |
481 | 481 |
482 return 1; | 482 return 1; |
483 } | 483 } |
484 | 484 |
485 static unsigned long | 485 static unsigned long |
486 gtk_image_instance_hash (struct Lisp_Image_Instance *p, int depth) | 486 gtk_image_instance_hash (struct Lisp_Image_Instance *p, int UNUSED (depth)) |
487 { | 487 { |
488 switch (IMAGE_INSTANCE_TYPE (p)) | 488 switch (IMAGE_INSTANCE_TYPE (p)) |
489 { | 489 { |
490 case IMAGE_MONO_PIXMAP: | 490 case IMAGE_MONO_PIXMAP: |
491 case IMAGE_COLOR_PIXMAP: | 491 case IMAGE_COLOR_PIXMAP: |
597 /* Check that this server supports cursors of size WIDTH * HEIGHT. If | 597 /* Check that this server supports cursors of size WIDTH * HEIGHT. If |
598 not, signal an error. INSTANTIATOR is only used in the error | 598 not, signal an error. INSTANTIATOR is only used in the error |
599 message. */ | 599 message. */ |
600 | 600 |
601 static void | 601 static void |
602 check_pointer_sizes (unsigned int width, unsigned int height, | 602 check_pointer_sizes (unsigned int UNUSED (width), unsigned int UNUSED (height), |
603 Lisp_Object instantiator) | 603 Lisp_Object UNUSED (instantiator)) |
604 { | 604 { |
605 /* #### BILL!!! There is no way to call XQueryBestCursor from Gdk! */ | 605 /* #### BILL!!! There is no way to call XQueryBestCursor from Gdk! */ |
606 #if 0 | 606 #if 0 |
607 unsigned int best_width, best_height; | 607 unsigned int best_width, best_height; |
608 if (! XQueryBestCursor (DisplayOfScreen (xs), RootWindowOfScreen (xs), | 608 if (! XQueryBestCursor (DisplayOfScreen (xs), RootWindowOfScreen (xs), |
647 xbg->red = xbg->green = xbg->blue = ~0; | 647 xbg->red = xbg->green = xbg->blue = ~0; |
648 } | 648 } |
649 } | 649 } |
650 | 650 |
651 static void | 651 static void |
652 maybe_recolor_cursor (Lisp_Object image_instance, Lisp_Object foreground, | 652 maybe_recolor_cursor (Lisp_Object UNUSED (image_instance), |
653 Lisp_Object background) | 653 Lisp_Object UNUSED (foreground), |
654 Lisp_Object UNUSED (background)) | |
654 { | 655 { |
655 #if 0 | 656 #if 0 |
656 /* #### BILL!!! */ | 657 /* #### BILL!!! */ |
657 Lisp_Object device = XIMAGE_INSTANCE_DEVICE (image_instance); | 658 Lisp_Object device = XIMAGE_INSTANCE_DEVICE (image_instance); |
658 GdkColor xfg, xbg; | 659 GdkColor xfg, xbg; |
828 int width, int height, | 829 int width, int height, |
829 int slices, | 830 int slices, |
830 unsigned char *eimage, | 831 unsigned char *eimage, |
831 int dest_mask, | 832 int dest_mask, |
832 Lisp_Object instantiator, | 833 Lisp_Object instantiator, |
833 Lisp_Object domain) | 834 Lisp_Object UNUSED (domain)) |
834 { | 835 { |
835 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); | 836 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); |
836 GdkColormap *cmap = DEVICE_GTK_COLORMAP (XDEVICE(device)); | 837 GdkColormap *cmap = DEVICE_GTK_COLORMAP (XDEVICE(device)); |
837 unsigned long *pixtbl = NULL; | 838 unsigned long *pixtbl = NULL; |
838 int npixels = 0; | 839 int npixels = 0; |
890 Lisp_Object instantiator, | 891 Lisp_Object instantiator, |
891 Lisp_Object pointer_fg, | 892 Lisp_Object pointer_fg, |
892 Lisp_Object pointer_bg, | 893 Lisp_Object pointer_bg, |
893 int dest_mask, | 894 int dest_mask, |
894 GdkPixmap *mask, | 895 GdkPixmap *mask, |
895 Lisp_Object mask_filename) | 896 Lisp_Object UNUSED (mask_filename)) |
896 { | 897 { |
897 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); | 898 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); |
898 Lisp_Object foreground = find_keyword_in_vector (instantiator, Q_foreground); | 899 Lisp_Object foreground = find_keyword_in_vector (instantiator, Q_foreground); |
899 Lisp_Object background = find_keyword_in_vector (instantiator, Q_background); | 900 Lisp_Object background = find_keyword_in_vector (instantiator, Q_background); |
900 GdkColor fg; | 901 GdkColor fg; |
1046 /* Instantiate method for XBM's. */ | 1047 /* Instantiate method for XBM's. */ |
1047 | 1048 |
1048 static void | 1049 static void |
1049 gtk_xbm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 1050 gtk_xbm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
1050 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 1051 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
1051 int dest_mask, Lisp_Object domain) | 1052 int dest_mask, Lisp_Object UNUSED (domain)) |
1052 { | 1053 { |
1053 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); | 1054 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); |
1054 const char *gcc_go_home; | 1055 const char *gcc_go_home; |
1055 | 1056 |
1056 assert (!NILP (data)); | 1057 assert (!NILP (data)); |
1333 extern jmp_buf comp_env; | 1334 extern jmp_buf comp_env; |
1334 #undef SYSV32 | 1335 #undef SYSV32 |
1335 | 1336 |
1336 static void | 1337 static void |
1337 gtk_xface_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 1338 gtk_xface_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
1338 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 1339 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
1339 int dest_mask, Lisp_Object domain) | 1340 int dest_mask, Lisp_Object UNUSED (domain)) |
1340 { | 1341 { |
1341 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); | 1342 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); |
1342 int i, stattis; | 1343 int i, stattis; |
1343 char *p, *bits, *bp; | 1344 char *p, *bits, *bp; |
1344 const char * volatile emsg = 0; | 1345 const char * volatile emsg = 0; |
1453 return IMAGE_UNKNOWN; | 1454 return IMAGE_UNKNOWN; |
1454 } | 1455 } |
1455 | 1456 |
1456 static void | 1457 static void |
1457 gtk_resource_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 1458 gtk_resource_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
1458 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 1459 Lisp_Object UNUSED (pointer_fg), |
1459 int dest_mask, Lisp_Object domain) | 1460 Lisp_Object UNUSED (pointer_bg), |
1461 int UNUSED (dest_mask), Lisp_Object UNUSED (domain)) | |
1460 { | 1462 { |
1461 struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 1463 struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
1462 GdkCursor *c = NULL; | 1464 GdkCursor *c = NULL; |
1463 enum image_instance_type type; | 1465 enum image_instance_type type; |
1464 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); | 1466 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); |
1535 } | 1537 } |
1536 | 1538 |
1537 static Lisp_Object | 1539 static Lisp_Object |
1538 autodetect_normalize (Lisp_Object instantiator, | 1540 autodetect_normalize (Lisp_Object instantiator, |
1539 Lisp_Object console_type, | 1541 Lisp_Object console_type, |
1540 Lisp_Object dest_mask) | 1542 Lisp_Object UNUSED (dest_mask)) |
1541 { | 1543 { |
1542 Lisp_Object file = find_keyword_in_vector (instantiator, Q_data); | 1544 Lisp_Object file = find_keyword_in_vector (instantiator, Q_data); |
1543 Lisp_Object filename = Qnil; | 1545 Lisp_Object filename = Qnil; |
1544 Lisp_Object data = Qnil; | 1546 Lisp_Object data = Qnil; |
1545 struct gcpro gcpro1, gcpro2, gcpro3; | 1547 struct gcpro gcpro1, gcpro2, gcpro3; |
1689 } | 1691 } |
1690 | 1692 |
1691 static void | 1693 static void |
1692 font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 1694 font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
1693 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 1695 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
1694 int dest_mask, Lisp_Object domain) | 1696 int dest_mask, Lisp_Object UNUSED (domain)) |
1695 { | 1697 { |
1696 /* This function can GC */ | 1698 /* This function can GC */ |
1697 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); | 1699 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); |
1698 struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 1700 struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
1699 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); | 1701 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); |
1874 } | 1876 } |
1875 | 1877 |
1876 static void | 1878 static void |
1877 cursor_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 1879 cursor_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
1878 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 1880 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
1879 int dest_mask, Lisp_Object domain) | 1881 int dest_mask, Lisp_Object UNUSED (domain)) |
1880 { | 1882 { |
1881 /* This function can GC */ | 1883 /* This function can GC */ |
1882 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); | 1884 Lisp_Object data = find_keyword_in_vector (instantiator, Q_data); |
1883 struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 1885 struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
1884 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); | 1886 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); |
2130 #endif | 2132 #endif |
2131 } | 2133 } |
2132 | 2134 |
2133 /* instantiate and gtk type subwindow */ | 2135 /* instantiate and gtk type subwindow */ |
2134 static void | 2136 static void |
2135 gtk_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 2137 gtk_subwindow_instantiate (Lisp_Object image_instance, |
2136 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2138 Lisp_Object UNUSED (instantiator), |
2137 int dest_mask, Lisp_Object domain) | 2139 Lisp_Object UNUSED (pointer_fg), |
2140 Lisp_Object UNUSED (pointer_bg), | |
2141 int UNUSED (dest_mask), Lisp_Object UNUSED (domain)) | |
2138 { | 2142 { |
2139 /* This function can GC */ | 2143 /* This function can GC */ |
2140 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); | 2144 Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); |
2141 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); | 2145 Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii); |
2142 | 2146 |
2283 } | 2287 } |
2284 | 2288 |
2285 static void | 2289 static void |
2286 gtk_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, | 2290 gtk_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator, |
2287 Lisp_Object pointer_fg, Lisp_Object pointer_bg, | 2291 Lisp_Object pointer_fg, Lisp_Object pointer_bg, |
2288 int dest_mask, Lisp_Object domain) | 2292 int UNUSED (dest_mask), Lisp_Object domain) |
2289 { | 2293 { |
2290 call_with_suspended_errors ((lisp_fn_t) gtk_widget_instantiate_1, | 2294 call_with_suspended_errors ((lisp_fn_t) gtk_widget_instantiate_1, |
2291 Qnil, Qimage, | 2295 Qnil, Qimage, |
2292 ERROR_ME_WARN, 5, | 2296 ERROR_ME_WARN, 5, |
2293 image_instance, instantiator, | 2297 image_instance, instantiator, |
2296 domain); | 2300 domain); |
2297 } | 2301 } |
2298 | 2302 |
2299 /* get properties of a control */ | 2303 /* get properties of a control */ |
2300 static Lisp_Object | 2304 static Lisp_Object |
2301 gtk_widget_property (Lisp_Object image_instance, Lisp_Object prop) | 2305 gtk_widget_property (Lisp_Object UNUSED (image_instance), Lisp_Object prop) |
2302 { | 2306 { |
2303 /* Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); */ | 2307 /* Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance); */ |
2304 | 2308 |
2305 /* get the text from a control */ | 2309 /* get the text from a control */ |
2306 if (EQ (prop, Q_text)) | 2310 if (EQ (prop, Q_text)) |
2346 This method can be used by all widgets. | 2350 This method can be used by all widgets. |
2347 */ | 2351 */ |
2348 static void | 2352 static void |
2349 gtk_widget_query_geometry (Lisp_Object image_instance, | 2353 gtk_widget_query_geometry (Lisp_Object image_instance, |
2350 int* width, int* height, | 2354 int* width, int* height, |
2351 enum image_instance_geometry disp, Lisp_Object domain) | 2355 enum image_instance_geometry UNUSED (disp), |
2356 Lisp_Object UNUSED (domain)) | |
2352 { | 2357 { |
2353 Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); | 2358 Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); |
2354 | 2359 |
2355 if (p->data != NULL) | 2360 if (p->data != NULL) |
2356 { | 2361 { |
2461 setup. | 2466 setup. |
2462 */ | 2467 */ |
2463 static void | 2468 static void |
2464 gtk_add_tab_item(Lisp_Object image_instance, | 2469 gtk_add_tab_item(Lisp_Object image_instance, |
2465 GtkNotebook* nb, Lisp_Object item, | 2470 GtkNotebook* nb, Lisp_Object item, |
2466 Lisp_Object domain, int i) | 2471 Lisp_Object domain, int UNUSED (i)) |
2467 { | 2472 { |
2468 Lisp_Object name; | 2473 Lisp_Object name; |
2469 int hash_id = 0; | 2474 int hash_id = 0; |
2470 char *c_name = NULL; | 2475 char *c_name = NULL; |
2471 GtkWidget* box; | 2476 GtkWidget* box; |
2513 } | 2518 } |
2514 | 2519 |
2515 /* Signal handler for the switch-page signal. */ | 2520 /* Signal handler for the switch-page signal. */ |
2516 static void gtk_tab_control_callback(GtkNotebook *notebook, | 2521 static void gtk_tab_control_callback(GtkNotebook *notebook, |
2517 GtkNotebookPage *page, | 2522 GtkNotebookPage *page, |
2518 gint page_num, | 2523 gint UNUSED (page_num), |
2519 gpointer user_data) | 2524 gpointer UNUSED (user_data)) |
2520 { | 2525 { |
2521 /* | 2526 /* |
2522 This callback is called for every selection, not just user selection. | 2527 This callback is called for every selection, not just user selection. |
2523 We're only interested in user selection, which occurs outside of | 2528 We're only interested in user selection, which occurs outside of |
2524 redisplay. | 2529 redisplay. |