Mercurial > vim
comparison src/integration.c @ 2520:6768ebd0bc04 vim73
Remove unused code.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 08 Aug 2010 16:38:42 +0200 |
parents | 1bac28a53fae |
children | bfade53bcafb |
comparison
equal
deleted
inserted
replaced
2519:a76416990f54 | 2520:6768ebd0bc04 |
---|---|
390 #if 0 | 390 #if 0 |
391 int pingNum; | 391 int pingNum; |
392 | 392 |
393 pingNum = atoi(&cmd[5]); | 393 pingNum = atoi(&cmd[5]); |
394 workshop_send_ack(ackNum); | 394 workshop_send_ack(ackNum); |
395 WHAT DO I DO HERE? | 395 /* WHAT DO I DO HERE? */ |
396 #endif | 396 #endif |
397 } | 397 } |
398 HANDLE_ERRORS(cmd); | 398 HANDLE_ERRORS(cmd); |
399 break; | 399 break; |
400 | 400 |
752 | 752 |
753 /* | 753 /* |
754 * Utility functions | 754 * Utility functions |
755 */ | 755 */ |
756 | 756 |
757 #if 0 | |
758 /* Set icon for the window */ | |
759 void | |
760 workshop_set_icon(Display *display, Widget shell, char **xpmdata, | |
761 int width, int height) | |
762 { | |
763 Pixel bgPixel; | |
764 XpmAttributes xpmAttributes; | |
765 XSetWindowAttributes attr; | |
766 Window iconWindow; | |
767 int depth; | |
768 int screenNum; | |
769 Pixmap pixmap; | |
770 | |
771 /* Create the pixmap/icon window which is shown when you | |
772 * iconify the sccs viewer | |
773 * This code snipped was adapted from Sun WorkShop's source base, | |
774 * setIcon.cc. | |
775 */ | |
776 XtVaGetValues(shell, XmNbackground, &bgPixel, NULL); | |
777 screenNum = XScreenNumberOfScreen(XtScreen(shell)); | |
778 depth = DisplayPlanes(display, screenNum); | |
779 xpmAttributes.valuemask = XpmColorSymbols; | |
780 xpmAttributes.numsymbols = 1; | |
781 xpmAttributes.colorsymbols = | |
782 (XpmColorSymbol *)XtMalloc(sizeof (XpmColorSymbol) * | |
783 xpmAttributes.numsymbols); | |
784 xpmAttributes.colorsymbols[0].name = NOCATGETS("BgColor"); | |
785 xpmAttributes.colorsymbols[0].value = NULL; | |
786 xpmAttributes.colorsymbols[0].pixel = bgPixel; | |
787 if (XpmCreatePixmapFromData(display, | |
788 RootWindow(display, screenNum), xpmdata, &pixmap, | |
789 NULL, &xpmAttributes) >= 0) { | |
790 attr.background_pixmap = pixmap; | |
791 iconWindow = XCreateWindow(display, RootWindow(display, | |
792 screenNum), 0, 0, width, height, 0, depth, | |
793 (unsigned int)CopyFromParent, | |
794 CopyFromParent, CWBackPixmap, &attr); | |
795 | |
796 XtVaSetValues(shell, | |
797 XtNiconWindow, iconWindow, NULL); | |
798 } | |
799 XtFree((char *)xpmAttributes.colorsymbols); | |
800 } | |
801 #endif | |
802 | 757 |
803 /* Minimize and maximize shells. From libutil's shell.cc. */ | 758 /* Minimize and maximize shells. From libutil's shell.cc. */ |
804 | 759 |
805 /* utility functions from libutil's shell.cc */ | 760 /* utility functions from libutil's shell.cc */ |
806 static Boolean | 761 static Boolean |
931 *height = hgt; | 886 *height = hgt; |
932 } | 887 } |
933 return success; | 888 return success; |
934 } | 889 } |
935 | 890 |
936 #if 0 | |
937 Boolean workshop_get_rows_cols(int *rows, int *cols) | |
938 { | |
939 static int r = 0; | |
940 static int c = 0; | |
941 static Boolean firstTime = True; | |
942 static Boolean success = False; | |
943 | |
944 if (firstTime) { | |
945 char *settings; | |
946 | |
947 settings = getenv(NOCATGETS("SPRO_GUI_ROWS_COLS")); | |
948 if (settings != NULL) { | |
949 r = atoi(settings); | |
950 settings = strrchr(settings, ':'); | |
951 if (settings++ != NULL) { | |
952 c = atoi(settings); | |
953 } | |
954 if (r > 0 && c > 0) { | |
955 success = True; | |
956 } | |
957 firstTime = False; | |
958 } | |
959 } | |
960 | |
961 if (success) { | |
962 *rows = r; | |
963 *cols = c; | |
964 } | |
965 return success; | |
966 } | |
967 #endif | |
968 | |
969 /* | 891 /* |
970 * Toolbar code | 892 * Toolbar code |
971 */ | 893 */ |
972 | 894 |
973 void workshop_sensitivity(int num, char *table) | 895 void workshop_sensitivity(int num, char *table) |
1048 workshop_set_option(name, value); | 970 workshop_set_option(name, value); |
1049 } | 971 } |
1050 } | 972 } |
1051 | 973 |
1052 | 974 |
1053 #if 0 | |
1054 /* | |
1055 * Send information to eserve on certain editor events | |
1056 * You must make sure these are called when necessary | |
1057 */ | |
1058 void workshop_file_closed(char *filename) | |
1059 { | |
1060 char buffer[2*MAXPATHLEN]; | |
1061 vim_snprintf(buffer, sizeof(buffer), | |
1062 NOCATGETS("deletedFile %s\n"), filename); | |
1063 dummy = write(sd, buffer, strlen(buffer)); | |
1064 } | |
1065 #endif | |
1066 | |
1067 void workshop_file_closed_lineno(char *filename, int lineno) | 975 void workshop_file_closed_lineno(char *filename, int lineno) |
1068 { | 976 { |
1069 char buffer[2*MAXPATHLEN]; | 977 char buffer[2*MAXPATHLEN]; |
1070 vim_snprintf(buffer, sizeof(buffer), | 978 vim_snprintf(buffer, sizeof(buffer), |
1071 NOCATGETS("deletedFile %s %d\n"), filename, lineno); | 979 NOCATGETS("deletedFile %s %d\n"), filename, lineno); |
1090 | 998 |
1091 /* Let editor report any moved marks that the eserve client | 999 /* Let editor report any moved marks that the eserve client |
1092 * should deal with (for example, moving location-based breakpoints) */ | 1000 * should deal with (for example, moving location-based breakpoints) */ |
1093 workshop_moved_marks(filename); | 1001 workshop_moved_marks(filename); |
1094 } | 1002 } |
1095 | |
1096 #if 0 | |
1097 void workshop_file_modified(char *filename) | |
1098 { | |
1099 char buffer[2*MAXPATHLEN]; | |
1100 vim_snprintf(buffer, sizeof(buffer), | |
1101 NOCATGETS("modifiedFile %s\n"), filename); | |
1102 dummy = write(sd, buffer, strlen(buffer)); | |
1103 } | |
1104 | |
1105 void workshop_move_mark(char *filename, int markId, int newLineno) | |
1106 { | |
1107 char buffer[2*MAXPATHLEN]; | |
1108 vim_snprintf(buffer, sizeof(buffer), | |
1109 NOCATGETS("moveMark %s %d %d\n"), filename, markId, newLineno); | |
1110 dummy = write(sd, buffer, strlen(buffer)); | |
1111 } | |
1112 #endif | |
1113 | 1003 |
1114 void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h) | 1004 void workshop_frame_moved(int new_x, int new_y, int new_w, int new_h) |
1115 { | 1005 { |
1116 char buffer[200]; | 1006 char buffer[200]; |
1117 | 1007 |