~ubuntu-branches/debian/squeeze/putty/squeeze

« back to all changes in this revision

Viewing changes to macosx/osxwin.m

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-05-28 09:28:32 UTC
  • mfrom: (4.1.4 hardy)
  • Revision ID: james.westby@ubuntu.com-20080528092832-88epkb3d4s1zsw61
Tags: 0.60-3
* Move putty to Applications/Network/Communication menu sub-section.
* Use dh_desktop.

Show diffs side-by-side

added added

removed removed

Lines of Context:
794
794
    return term_data(term, is_stderr, data, len);
795
795
}
796
796
 
 
797
- (int)fromBackendUntrusted:(const char *)data len:(int)len
 
798
{
 
799
    return term_data_untrusted(term, data, len);
 
800
}
 
801
 
797
802
- (void)startAlert:(NSAlert *)alert
798
803
    withCallback:(void (*)(void *, int))callback andCtx:(void *)ctx
799
804
{
885
890
    // FIXME: else show restart menu item
886
891
}
887
892
 
 
893
- (Terminal *)term
 
894
{
 
895
    return term;
 
896
}
 
897
 
888
898
@end
889
899
 
890
900
int from_backend(void *frontend, int is_stderr, const char *data, int len)
893
903
    return [win fromBackend:data len:len isStderr:is_stderr];
894
904
}
895
905
 
 
906
int from_backend_untrusted(void *frontend, const char *data, int len)
 
907
{
 
908
    SessionWindow *win = (SessionWindow *)frontend;
 
909
    return [win fromBackendUntrusted:data len:len];
 
910
}
 
911
 
 
912
int get_userpass_input(prompts_t *p, unsigned char *in, int inlen)
 
913
{
 
914
    SessionWindow *win = (SessionWindow *)p->frontend;
 
915
    Terminal *term = [win term];
 
916
    return term_get_userpass_input(term, p, in, inlen);
 
917
}
 
918
 
896
919
void frontend_keypress(void *handle)
897
920
{
898
921
    /* FIXME */
913
936
     */
914
937
}
915
938
 
 
939
char *get_ttymode(void *frontend, const char *mode)
 
940
{
 
941
    SessionWindow *win = (SessionWindow *)frontend;
 
942
    Terminal *term = [win term];
 
943
    return term_get_ttymode(term, mode);
 
944
}
 
945
 
916
946
void update_specials_menu(void *frontend)
917
947
{
918
948
    //SessionWindow *win = (SessionWindow *)frontend;
925
955
 * may want to perform additional actions on any kind of bell (for
926
956
 * example, taskbar flashing in Windows).
927
957
 */
928
 
void beep(void *frontend, int mode)
 
958
void do_beep(void *frontend, int mode)
929
959
{
930
960
    //SessionWindow *win = (SessionWindow *)frontend;
931
961
    if (mode != BELL_VISUAL)
979
1009
    for (i = 0; i < NEXTCOLOURS; i++) {
980
1010
        if (i < 216) {
981
1011
            int r = i / 36, g = (i / 6) % 6, b = i % 6;
982
 
            [win setColour:i+16 r:r/5.0 g:g/5.0 b:b/5.0];
 
1012
            r = r ? r*40+55 : 0; g = g ? b*40+55 : 0; b = b ? b*40+55 : 0;
 
1013
            [win setColour:i+16 r:r/255.0 g:g/255.0 b:b/255.0];
983
1014
        } else {
984
1015
            int shade = i - 216;
985
 
            float fshade = (shade + 1) / (float)(NEXTCOLOURS - 216 + 1);
 
1016
            float fshade = (shade * 10 + 8) / 255.0;
986
1017
            [win setColour:i+16 r:fshade g:fshade b:fshade];
987
1018
        }
988
1019
    }
1161
1192
    /* FIXME */
1162
1193
}
1163
1194
 
1164
 
void write_clip(void *frontend, wchar_t * data, int len, int must_deselect)
 
1195
void write_clip(void *frontend, wchar_t *data, int *attr, int len, int must_deselect)
1165
1196
{
1166
1197
    //SessionWindow *win = (SessionWindow *)frontend;
1167
1198
    /* FIXME */