comparison src/objects-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 91d4c8c65a0f
children de9952d2ed18
comparison
equal deleted inserted replaced
2285:914c5afaac33 2286:04bc9d2f42c7
56 worry about it. 56 worry about it.
57 57
58 Return value is 1 for normal success, 2 for nearest color success, 58 Return value is 1 for normal success, 2 for nearest color success,
59 3 for Non-deallocable sucess. */ 59 3 for Non-deallocable sucess. */
60 int 60 int
61 allocate_nearest_color (GdkColormap *colormap, GdkVisual *visual, 61 allocate_nearest_color (GdkColormap *colormap, GdkVisual *UNUSED (visual),
62 GdkColor *color_def) 62 GdkColor *color_def)
63 { 63 {
64 int rc; 64 int rc;
65 65
66 rc = gdk_colormap_alloc_color (colormap, color_def, FALSE, TRUE); 66 rc = gdk_colormap_alloc_color (colormap, color_def, FALSE, TRUE);
136 } 136 }
137 137
138 static void 138 static void
139 gtk_print_color_instance (struct Lisp_Color_Instance *c, 139 gtk_print_color_instance (struct Lisp_Color_Instance *c,
140 Lisp_Object printcharfun, 140 Lisp_Object printcharfun,
141 int escapeflag) 141 int UNUSED (escapeflag))
142 { 142 {
143 GdkColor *color = COLOR_INSTANCE_GTK_COLOR (c); 143 GdkColor *color = COLOR_INSTANCE_GTK_COLOR (c);
144 write_fmt_string (printcharfun, " %ld=(%X,%X,%X)", 144 write_fmt_string (printcharfun, " %ld=(%X,%X,%X)",
145 color->pixel, color->red, color->green, color->blue); 145 color->pixel, color->red, color->green, color->blue);
146 } 146 }
170 be comparing their names or pixel values instead. */ 170 be comparing their names or pixel values instead. */
171 171
172 static int 172 static int
173 gtk_color_instance_equal (struct Lisp_Color_Instance *c1, 173 gtk_color_instance_equal (struct Lisp_Color_Instance *c1,
174 struct Lisp_Color_Instance *c2, 174 struct Lisp_Color_Instance *c2,
175 int depth) 175 int UNUSED (depth))
176 { 176 {
177 return (gdk_color_equal (COLOR_INSTANCE_GTK_COLOR (c1), 177 return (gdk_color_equal (COLOR_INSTANCE_GTK_COLOR (c1),
178 COLOR_INSTANCE_GTK_COLOR (c2))); 178 COLOR_INSTANCE_GTK_COLOR (c2)));
179 } 179 }
180 180
181 static unsigned long 181 static unsigned long
182 gtk_color_instance_hash (struct Lisp_Color_Instance *c, int depth) 182 gtk_color_instance_hash (struct Lisp_Color_Instance *c, int UNUSED (depth))
183 { 183 {
184 return (gdk_color_hash (COLOR_INSTANCE_GTK_COLOR (c), NULL)); 184 return (gdk_color_hash (COLOR_INSTANCE_GTK_COLOR (c), NULL));
185 } 185 }
186 186
187 static Lisp_Object 187 static Lisp_Object
192 make_int (color->green), 192 make_int (color->green),
193 make_int (color->blue))); 193 make_int (color->blue)));
194 } 194 }
195 195
196 static int 196 static int
197 gtk_valid_color_name_p (struct device *d, Lisp_Object color) 197 gtk_valid_color_name_p (struct device *UNUSED (d), Lisp_Object color)
198 { 198 {
199 GdkColor c; 199 GdkColor c;
200 const char *extname; 200 const char *extname;
201 201
202 TO_EXTERNAL_FORMAT (LISP_STRING, color, C_STRING_ALLOCA, extname, Qctext); 202 TO_EXTERNAL_FORMAT (LISP_STRING, color, C_STRING_ALLOCA, extname, Qctext);
210 /************************************************************************/ 210 /************************************************************************/
211 /* font instances */ 211 /* font instances */
212 /************************************************************************/ 212 /************************************************************************/
213 213
214 static int 214 static int
215 gtk_initialize_font_instance (struct Lisp_Font_Instance *f, Lisp_Object name, 215 gtk_initialize_font_instance (struct Lisp_Font_Instance *f,
216 Lisp_Object device, Error_Behavior errb) 216 Lisp_Object UNUSED (name),
217 Lisp_Object UNUSED (device), Error_Behavior errb)
217 { 218 {
218 GdkFont *gf; 219 GdkFont *gf;
219 XFontStruct *xf; 220 XFontStruct *xf;
220 const char *extname; 221 const char *extname;
221 222
305 } 306 }
306 307
307 static void 308 static void
308 gtk_print_font_instance (struct Lisp_Font_Instance *f, 309 gtk_print_font_instance (struct Lisp_Font_Instance *f,
309 Lisp_Object printcharfun, 310 Lisp_Object printcharfun,
310 int escapeflag) 311 int UNUSED (escapeflag))
311 { 312 {
312 write_fmt_string (printcharfun, " 0x%lx", 313 write_fmt_string (printcharfun, " 0x%lx",
313 (unsigned long) gdk_font_id (FONT_INSTANCE_GTK_FONT (f))); 314 (unsigned long) gdk_font_id (FONT_INSTANCE_GTK_FONT (f)));
314 } 315 }
315 316
330 /* Forward declarations for X specific functions at the end of the file */ 331 /* Forward declarations for X specific functions at the end of the file */
331 Lisp_Object __get_gtk_font_truename (GdkFont *gdk_font, int expandp); 332 Lisp_Object __get_gtk_font_truename (GdkFont *gdk_font, int expandp);
332 static Lisp_Object __gtk_list_fonts_internal (const char *pattern); 333 static Lisp_Object __gtk_list_fonts_internal (const char *pattern);
333 334
334 static Lisp_Object 335 static Lisp_Object
335 gtk_font_instance_truename (struct Lisp_Font_Instance *f, Error_Behavior errb) 336 gtk_font_instance_truename (struct Lisp_Font_Instance *f,
337 Error_Behavior UNUSED (errb))
336 { 338 {
337 if (NILP (FONT_INSTANCE_TRUENAME (f))) 339 if (NILP (FONT_INSTANCE_TRUENAME (f)))
338 { 340 {
339 FONT_INSTANCE_TRUENAME (f) = __get_gtk_font_truename (FONT_INSTANCE_GTK_FONT (f), 1); 341 FONT_INSTANCE_TRUENAME (f) = __get_gtk_font_truename (FONT_INSTANCE_GTK_FONT (f), 1);
340 342
347 } 349 }
348 return (FONT_INSTANCE_TRUENAME (f)); 350 return (FONT_INSTANCE_TRUENAME (f));
349 } 351 }
350 352
351 static Lisp_Object 353 static Lisp_Object
352 gtk_font_instance_properties (struct Lisp_Font_Instance *f) 354 gtk_font_instance_properties (struct Lisp_Font_Instance *UNUSED (f))
353 { 355 {
354 Lisp_Object result = Qnil; 356 Lisp_Object result = Qnil;
355 357
356 /* #### BILL!!! */ 358 /* #### BILL!!! */
357 /* There seems to be no way to get this information under Gtk */ 359 /* There seems to be no way to get this information under Gtk */
358 return result; 360 return result;
359 } 361 }
360 362
361 static Lisp_Object 363 static Lisp_Object
362 gtk_list_fonts (Lisp_Object pattern, Lisp_Object device, Lisp_Object maxnumber) 364 gtk_list_fonts (Lisp_Object pattern, Lisp_Object UNUSED (device),
365 Lisp_Object UNUSED (maxnumber))
363 { 366 {
364 const char *patternext; 367 const char *patternext;
365 368
366 TO_EXTERNAL_FORMAT (LISP_STRING, pattern, C_STRING_ALLOCA, patternext, Qbinary); 369 TO_EXTERNAL_FORMAT (LISP_STRING, pattern, C_STRING_ALLOCA, patternext, Qbinary);
367 370
369 } 372 }
370 373
371 #ifdef MULE 374 #ifdef MULE
372 375
373 static int 376 static int
374 gtk_font_spec_matches_charset (struct device *d, Lisp_Object charset, 377 gtk_font_spec_matches_charset (struct device *UNUSED (d), Lisp_Object charset,
375 const Ibyte *nonreloc, Lisp_Object reloc, 378 const Ibyte *nonreloc, Lisp_Object reloc,
376 Bytecount offset, Bytecount length, 379 Bytecount offset, Bytecount length,
377 int stage) 380 int stage)
378 { 381 {
379 if (stage) 382 if (stage)