| 2871 | |
| 2872 | #if 0 // TARGET_API_MAC_CARBON |
| 2873 | static pascal OSStatus |
| 2874 | TextEvent(EventHandlerCallRef nexthandler, EventRef event, void *userdata) |
| 2875 | { |
| 2876 | NhWindow *wind = (NhWindow *) userdata; |
| 2877 | |
| 2878 | |
| 2879 | switch (GetEventClass(event)) { |
| 2880 | case kEventClassControl: { |
| 2881 | ControlRef control; |
| 2882 | ControlID id; |
| 2883 | |
| 2884 | switch (GetEventKind(event)) { |
| 2885 | case kEventControlHit: |
| 2886 | GetEventParameter(event, kEventParamDirectObject, |
| 2887 | typeControlRef, NULL, sizeof(ControlRef), NULL, &control); |
| 2888 | GetControlID(control, &id); |
| 2889 | /* TODO... */ |
| 2890 | return (noErr); |
| 2891 | } |
| 2892 | break; |
| 2893 | } |
| 2894 | |
| 2895 | case kEventClassKeyboard: { |
| 2896 | char ch; |
| 2897 | UInt32 modifiers; |
| 2898 | |
| 2899 | |
| 2900 | GetEventParameter(event, kEventParamKeyMacCharCodes, typeChar, NULL, |
| 2901 | sizeof(char), NULL, &ch); |
| 2902 | GetEventParameter(event, kEventParamKeyModifiers, typeUInt32, NULL, |
| 2903 | sizeof(UInt32), NULL, &modifiers); |
| 2904 | if (modifiers & cmdKey) |
| 2905 | return (eventNotHandledErr); |
| 2906 | TextKey(wind, ch); |
| 2907 | return (noErr); |
| 2908 | } |
| 2909 | |
| 2910 | case kEventClassWindow: |
| 2911 | switch (GetEventKind(event)) { |
| 2912 | case kEventWindowDrawContent: |
| 2913 | CallNextEventHandler(nexthandler, event); |
| 2914 | TextUpdate(wind); |
| 2915 | return (noErr); |
| 2916 | |
| 2917 | case kEventWindowClose: |
| 2918 | /* TODO... */ |
| 2919 | break; |
| 2920 | } |
| 2921 | break; |
| 2922 | } |
| 2923 | return (eventNotHandledErr); |
| 2924 | } |
| 2925 | |
| 2926 | #else |
| 2927 |
nothing calls this directly
no test coverage detected