Comment: | Add OFApplicationDidFinishLaunchingNotification |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
204b27318f30021ef63bb36d35beb485 |
User & Date: | js on 2022-11-13 19:07:37 |
Other Links: | manifest | tags |
2022-11-14
| ||
20:35 | Remove GitHub Actions for Nintendo 3(DS) check-in: 74c35b8762 user: js tags: trunk | |
2022-11-13
| ||
19:07 | Add OFApplicationDidFinishLaunchingNotification check-in: 204b27318f user: js tags: trunk | |
18:46 | utils/ofhttp: Fix signedness mismatch check-in: 50a345a4f5 user: js tags: trunk | |
Modified README.md from [711c05e9ce] to [b12bc1a9ce].
︙ | |||
319 320 321 322 323 324 325 | 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | - + | <h1 id="first-app">Writing your first application with ObjFW</h1> To create your first, empty application, you can use `objfw-new`: $ objfw-new --app MyFirstApp |
︙ |
Modified generators/library/LibraryGenerator.m from [69ede2939c] to [2b3f82b5f9].
︙ | |||
27 28 29 30 31 32 33 | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - + | @interface LibraryGenerator: OFObject <OFApplicationDelegate> @end OF_APPLICATION_DELEGATE(LibraryGenerator) @implementation LibraryGenerator |
︙ |
Modified generators/unicode/TableGenerator.m from [c1835e042f] to [f18304006d].
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + | [self release]; @throw e; } return self; } |
︙ |
Modified src/OFApplication.h from [d7b817478b] to [df94634a83].
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | + + + + + + | @class OFArray OF_GENERIC(ObjectType); @class OFDictionary OF_GENERIC(KeyType, ObjectType); @class OFMutableArray OF_GENERIC(ObjectType); @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); @class OFSandbox; @class OFString; /** * @brief A notification that will be sent when the application did finish * launching. */ extern const OFNotificationName OFApplicationDidFinishLaunchingNotification; /** * @brief A notification that will be sent when the application will terminate. */ extern const OFNotificationName OFApplicationWillTerminateNotification; /** * @brief Specify the class to be used as the application delegate. |
︙ | |||
47 48 49 50 51 52 53 | 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | - + | * @interface MyAppDelegate: OFObject <OFApplicationDelegate> * @end * * // In MyAppDelegate.m: * OF_APPLICATION_DELEGATE(MyAppDelegate) * * @implementation MyAppDelegate |
︙ | |||
77 78 79 80 81 82 83 84 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | + + + - + + + + - + | * * @note Signals are not available on AmigaOS! */ @protocol OFApplicationDelegate <OFObject> /** * @brief A method which is called when the application was initialized and is * running now. * * @param notification A notification with name * OFApplicationDidFinishLaunchingNotification */ |
︙ |
Modified src/OFApplication.m from [c3e00228c4] to [d6f9eb583b].
︙ | |||
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | + + - - - + + - - + + + + | andArgumentValues: (char **[])argv andWideArgumentCount: (int)wargc andWideArgumentValues: (wchar_t *[])wargv; #endif - (void)of_run; @end const OFNotificationName OFApplicationDidFinishLaunchingNotification = @"OFApplicationDidFinishLaunchingNotification"; const OFNotificationName OFApplicationWillTerminateNotification = @"OFApplicationWillTerminateNotification"; static OFApplication *app = nil; static void atexitHandler(void) { id <OFApplicationDelegate> delegate = app.delegate; |
︙ | |||
575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 | + + + + + + + + - + + | #undef REGISTER_SIGNAL } - (void)of_run { void *pool = objc_autoreleasePoolPush(); OFRunLoop *runLoop; OFNotification *notification; #ifdef OF_HAVE_THREADS [OFThread of_createMainThread]; runLoop = [OFRunLoop currentRunLoop]; #else runLoop = [[[OFRunLoop alloc] init] autorelease]; #endif [OFRunLoop of_setMainRunLoop: runLoop]; objc_autoreleasePoolPop(pool); /* * Note: runLoop is still valid after the release of the pool, as * of_setMainRunLoop: retained it. However, we only have a weak * reference to it now, whereas we had a strong reference before. */ pool = objc_autoreleasePoolPush(); notification = [OFNotification notificationWithName: OFApplicationDidFinishLaunchingNotification object: app]; [[OFNotificationCenter defaultCenter] postNotification: notification]; |
︙ |
Modified tests/TestsAppDelegate.m from [5b13043c48] to [07389d44c6].
︙ | |||
345 346 347 348 349 350 351 | 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | - + | if (OFStdOut.hasTerminal) { [OFStdOut writeString: @"\r"]; [OFStdOut reset]; [OFStdOut eraseLine]; } } |
︙ |
Modified tests/terminal/TerminalTests.m from [695364c6d5] to [98d7249eb5].
︙ | |||
23 24 25 26 27 28 29 | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | - + | @interface TerminalTests: OFObject <OFApplicationDelegate> @end OF_APPLICATION_DELEGATE(TerminalTests) @implementation TerminalTests |
︙ |
Modified utils/objfw-new/NewApp.m from [a817ca083b] to [47a07d5858].
︙ | |||
44 45 46 47 48 49 50 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | - + + | @"\n" @"@interface %@: OFObject <OFApplicationDelegate>\n" @"@end\n" @"\n" @"OF_APPLICATION_DELEGATE(%@)\n" @"\n" @"@implementation %@\n" |
Modified utils/objfw-new/ObjFWNew.m from [efa3835453] to [e1d195ab36].
︙ | |||
36 37 38 39 40 41 42 | 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | - + | [OFStdErr writeFormat: @"Usage: %@ --app|--class name\n", [OFApplication programName]]; [OFApplication terminateWithStatus: 1]; } @implementation ObjFWNew |
︙ |
Modified utils/ofarc/OFArc.m from [92125fd380] to [1abc9749ff].
︙ | |||
163 164 165 166 167 168 169 | 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | - + | [expandedFiles addObject: file]; } [archive addFiles: expandedFiles]; } @implementation OFArc |
︙ |
Modified utils/ofdns/OFDNS.m from [7740440ce7] to [32af1e7083].
︙ | |||
76 77 78 79 80 81 82 | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | - + | _errors++; } if (_inFlight == 0) [OFApplication terminateWithStatus: _errors]; } |
︙ |
Modified utils/ofhash/OFHash.m from [9cab35b0cf] to [8b4892a5e2].
︙ | |||
64 65 66 67 68 69 70 | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | - + | for (size_t i = 0; i < digestSize; i++) [OFStdOut writeFormat: @"%02x", digest[i]]; [OFStdOut writeFormat: @" %@\n", path]; } @implementation OFHash |
︙ |
Modified utils/ofhttp/OFHTTP.m from [f34323cefa] to [4bdf3b8ffc].
︙ | |||
408 409 410 411 412 413 414 | 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 | - + | [OFStdErr writeLine: OF_LOCALIZED(@"invalid_input_proxy", @"%[prog]: Proxy must to be in format host:port!", @"prog", [OFApplication programName])]; [OFApplication terminateWithStatus: 1]; } } |
︙ |