comparison src/objects-msw.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 a8d8f419b459
children ecf1ebac70d8
comparison
equal deleted inserted replaced
2285:914c5afaac33 2286:04bc9d2f42c7
1153 1153
1154 return 1; 1154 return 1;
1155 } 1155 }
1156 1156
1157 static int CALLBACK 1157 static int CALLBACK
1158 font_enum_callback_1 (ENUMLOGFONTEXW *lpelfe, NEWTEXTMETRICEXW *lpntme, 1158 font_enum_callback_1 (ENUMLOGFONTEXW *lpelfe,
1159 int FontType, struct font_enum_t *font_enum) 1159 NEWTEXTMETRICEXW *UNUSED (lpntme),
1160 int UNUSED (FontType), struct font_enum_t *font_enum)
1160 { 1161 {
1161 /* This function gets called once per facename per character set. 1162 /* This function gets called once per facename per character set.
1162 * We call a second callback to enumerate the fonts in each facename */ 1163 * We call a second callback to enumerate the fonts in each facename */
1163 return qxeEnumFontFamiliesEx (font_enum->hdc, &lpelfe->elfLogFont, 1164 return qxeEnumFontFamiliesEx (font_enum->hdc, &lpelfe->elfLogFont,
1164 (FONTENUMPROCW) font_enum_callback_2, 1165 (FONTENUMPROCW) font_enum_callback_2,
1170 "family::::charset" for TrueType fonts, "family::size::charset" 1171 "family::::charset" for TrueType fonts, "family::size::charset"
1171 otherwise. */ 1172 otherwise. */
1172 1173
1173 static int 1174 static int
1174 sort_font_list_function (Lisp_Object obj1, Lisp_Object obj2, 1175 sort_font_list_function (Lisp_Object obj1, Lisp_Object obj2,
1175 Lisp_Object pred) 1176 Lisp_Object UNUSED (pred))
1176 { 1177 {
1177 Ibyte *font1, *font2; 1178 Ibyte *font1, *font2;
1178 Ibyte *c1, *c2; 1179 Ibyte *c1, *c2;
1179 int t1, t2; 1180 int t1, t2;
1180 1181
1332 /* methods */ 1333 /* methods */
1333 /************************************************************************/ 1334 /************************************************************************/
1334 1335
1335 static int 1336 static int
1336 mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name, 1337 mswindows_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
1337 Lisp_Object device, Error_Behavior errb) 1338 Lisp_Object UNUSED (device),
1339 Error_Behavior errb)
1338 { 1340 {
1339 COLORREF color; 1341 COLORREF color;
1340 1342
1341 color = mswindows_string_to_color (XSTRING_DATA (name)); 1343 color = mswindows_string_to_color (XSTRING_DATA (name));
1342 if (color != (COLORREF) -1) 1344 if (color != (COLORREF) -1)
1358 #endif 1360 #endif
1359 1361
1360 static void 1362 static void
1361 mswindows_print_color_instance (Lisp_Color_Instance *c, 1363 mswindows_print_color_instance (Lisp_Color_Instance *c,
1362 Lisp_Object printcharfun, 1364 Lisp_Object printcharfun,
1363 int escapeflag) 1365 int UNUSED (escapeflag))
1364 { 1366 {
1365 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c); 1367 COLORREF color = COLOR_INSTANCE_MSWINDOWS_COLOR (c);
1366 write_fmt_string (printcharfun, 1368 write_fmt_string (printcharfun,
1367 " %06ld=(%04X,%04X,%04X)", color & 0xffffff, 1369 " %06ld=(%04X,%04X,%04X)", color & 0xffffff,
1368 GetRValue (color) * 257, GetGValue (color) * 257, 1370 GetRValue (color) * 257, GetGValue (color) * 257,
1380 } 1382 }
1381 1383
1382 static int 1384 static int
1383 mswindows_color_instance_equal (Lisp_Color_Instance *c1, 1385 mswindows_color_instance_equal (Lisp_Color_Instance *c1,
1384 Lisp_Color_Instance *c2, 1386 Lisp_Color_Instance *c2,
1385 int depth) 1387 int UNUSED (depth))
1386 { 1388 {
1387 return (COLOR_INSTANCE_MSWINDOWS_COLOR (c1) == 1389 return (COLOR_INSTANCE_MSWINDOWS_COLOR (c1) ==
1388 COLOR_INSTANCE_MSWINDOWS_COLOR (c2)); 1390 COLOR_INSTANCE_MSWINDOWS_COLOR (c2));
1389 } 1391 }
1390 1392
1391 static unsigned long 1393 static unsigned long
1392 mswindows_color_instance_hash (Lisp_Color_Instance *c, int depth) 1394 mswindows_color_instance_hash (Lisp_Color_Instance *c, int UNUSED (depth))
1393 { 1395 {
1394 return (unsigned long) COLOR_INSTANCE_MSWINDOWS_COLOR (c); 1396 return (unsigned long) COLOR_INSTANCE_MSWINDOWS_COLOR (c);
1395 } 1397 }
1396 1398
1397 static Lisp_Object 1399 static Lisp_Object
1402 make_int (GetGValue (color) * 257), 1404 make_int (GetGValue (color) * 257),
1403 make_int (GetBValue (color) * 257)); 1405 make_int (GetBValue (color) * 257));
1404 } 1406 }
1405 1407
1406 static int 1408 static int
1407 mswindows_valid_color_name_p (struct device *d, Lisp_Object color) 1409 mswindows_valid_color_name_p (struct device *UNUSED (d), Lisp_Object color)
1408 { 1410 {
1409 return (mswindows_string_to_color (XSTRING_DATA (color)) != (COLORREF) -1); 1411 return (mswindows_string_to_color (XSTRING_DATA (color)) != (COLORREF) -1);
1410 } 1412 }
1411 1413
1412 1414
1913 #endif 1915 #endif
1914 1916
1915 static void 1917 static void
1916 mswindows_print_font_instance (Lisp_Font_Instance *f, 1918 mswindows_print_font_instance (Lisp_Font_Instance *f,
1917 Lisp_Object printcharfun, 1919 Lisp_Object printcharfun,
1918 int escapeflag) 1920 int UNUSED (escapeflag))
1919 { 1921 {
1920 write_fmt_string (printcharfun, " 0x%lx", 1922 write_fmt_string (printcharfun, " 0x%lx",
1921 (unsigned long) 1923 (unsigned long)
1922 FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0)); 1924 FONT_INSTANCE_MSWINDOWS_HFONT_VARIANT (f, 0, 0));
1923 1925
1924 } 1926 }
1925 1927
1926 static Lisp_Object 1928 static Lisp_Object
1927 mswindows_list_fonts (Lisp_Object pattern, Lisp_Object device, 1929 mswindows_list_fonts (Lisp_Object pattern, Lisp_Object device,
1928 Lisp_Object maxnumber) 1930 Lisp_Object UNUSED (maxnumber))
1929 { 1931 {
1930 struct device *d = XDEVICE (device); 1932 struct device *d = XDEVICE (device);
1931 Lisp_Object font_list = Qnil, fonttail, result = Qnil; 1933 Lisp_Object font_list = Qnil, fonttail, result = Qnil;
1932 1934
1933 if (DEVICE_MSWINDOWS_P (d)) 1935 if (DEVICE_MSWINDOWS_P (d))
1949 1951
1950 return Fnreverse (result); 1952 return Fnreverse (result);
1951 } 1953 }
1952 1954
1953 static Lisp_Object 1955 static Lisp_Object
1954 mswindows_font_instance_truename (Lisp_Font_Instance *f, Error_Behavior errb) 1956 mswindows_font_instance_truename (Lisp_Font_Instance *f,
1957 Error_Behavior UNUSED (errb))
1955 { 1958 {
1956 return f->truename; 1959 return f->truename;
1957 } 1960 }
1958 1961
1959 #ifdef MULE 1962 #ifdef MULE
1960 1963
1961 static int 1964 static int
1962 mswindows_font_spec_matches_charset_stage_1 (struct device *d, 1965 mswindows_font_spec_matches_charset_stage_1 (struct device *UNUSED (d),
1963 Lisp_Object charset, 1966 Lisp_Object charset,
1964 const Ibyte *nonreloc, 1967 const Ibyte *nonreloc,
1965 Lisp_Object reloc, 1968 Lisp_Object reloc,
1966 Bytecount offset, 1969 Bytecount offset,
1967 Bytecount length) 1970 Bytecount length)