Skip to content

Commit fe4ae43

Browse files
committed
[[ Cleanup ]] Name all Obj-C classes consistently.
This patch makes sure all Objective-C classes defined by the engine have prefix com_runrev_livecode_MC*.
1 parent e69ed6c commit fe4ae43

23 files changed

+180
-180
lines changed

engine/src/mbliphonebrowser.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
class MCiOSBrowserControl;
5050

51-
@interface MCiOSBrowserDelegate : NSObject <UIWebViewDelegate>
51+
@interface com_runrev_livecode_MCiOSBrowserDelegate : NSObject <UIWebViewDelegate>
5252
{
5353
MCiOSBrowserControl *m_instance;
5454
bool m_pending_request;
@@ -130,7 +130,7 @@ - (void)setPendingRequest: (bool)newValue;
130130
virtual void DeleteView(UIView *view);
131131

132132
private:
133-
MCiOSBrowserDelegate *m_delegate;
133+
com_runrev_livecode_MCiOSBrowserDelegate *m_delegate;
134134
bool m_delay_requests;
135135
};
136136

@@ -902,7 +902,7 @@ bool datadetectortypes_to_string(UIDataDetectorTypes p_types, char *&r_list)
902902

903903
[t_view setHidden: YES];
904904

905-
m_delegate = [[MCiOSBrowserDelegate alloc] initWithInstance: this];
905+
m_delegate = [[com_runrev_livecode_MCiOSBrowserDelegate alloc] initWithInstance: this];
906906
[t_view setDelegate: m_delegate];
907907

908908
return t_view;
@@ -1013,7 +1013,7 @@ void Dispatch(void)
10131013

10141014
////////////////////////////////////////////////////////////////////////////////
10151015

1016-
@implementation MCiOSBrowserDelegate
1016+
@implementation com_runrev_livecode_MCiOSBrowserDelegate
10171017

10181018
- (id)initWithInstance:(MCiOSBrowserControl*)instance
10191019
{

engine/src/mbliphonebusyindicator.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
UIView *MCIPhoneGetView(void);
3838

39-
@interface BusyIndicator : NSObject <UIApplicationDelegate, UIActionSheetDelegate>
39+
@interface com_runrev_livecode_MCBusyIndicator : NSObject <UIApplicationDelegate, UIActionSheetDelegate>
4040
{
4141
UIView* m_indicator_view;
4242
UIView* m_view;
@@ -46,9 +46,9 @@ @interface BusyIndicator : NSObject <UIApplicationDelegate, UIActionSheetDelegat
4646
}
4747
@end
4848

49-
static BusyIndicator *s_busy_indicator = nil;
49+
static com_runrev_livecode_MCBusyIndicator *s_busy_indicator = nil;
5050

51-
@implementation BusyIndicator
51+
@implementation com_runrev_livecode_MCBusyIndicator
5252

5353
// MM-2013-02-04: [[ Bug 10642 ]] Added new optional opacity parameter to busy indicator.
5454
- (void) showBusy: (NSString*) p_title withOpacity: (int32_t) p_opacity
@@ -179,7 +179,7 @@ bool MCSystemBusyIndicatorStart (intenum_t p_indicator, MCStringRef p_label, int
179179
[s_busy_indicator hideBusy];
180180
[s_busy_indicator release];
181181
}
182-
s_busy_indicator = [[BusyIndicator alloc] init];
182+
s_busy_indicator = [[com_runrev_livecode_MCBusyIndicator alloc] init];
183183
if (p_label == nil)
184184
[s_busy_indicator showBusy:@"" withOpacity:p_opacity];
185185
else

engine/src/mbliphonecalendar.mm

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
////////////////////////////////////////////////////////////////////////////////
4444

4545
#ifdef __IPHONE_4_0
46-
@interface MCIPhonePickEventDelegate : UIViewController <EKEventEditViewDelegate>
46+
@interface com_runrev_livecode_MCIPhonePickEventDelegate : UIViewController <EKEventEditViewDelegate>
4747
#else
48-
@interface MCIPhonePickEventDelegate : UIViewController <EKEventEditViewDelegate, EKEventViewDelegate>
48+
@interface com_runrev_livecode_MCIPhonePickEventDelegate : UIViewController <EKEventEditViewDelegate, EKEventViewDelegate>
4949
#endif
5050
{
5151
bool m_running;
@@ -63,7 +63,7 @@ - (void)dealloc;
6363

6464
@end
6565

66-
@implementation MCIPhonePickEventDelegate
66+
@implementation com_runrev_livecode_MCIPhonePickEventDelegate
6767

6868
- (id)init
6969
{
@@ -536,8 +536,8 @@ bool MCSystemShowEvent(MCStringRef p_event_id, MCStringRef& r_result)
536536
bool t_result = false;
537537
NSString* t_ns_result = nil;
538538
NSString* t_ns_event = [NSString stringWithMCStringRef: p_event_id];
539-
MCIPhonePickEventDelegate *t_show_event;
540-
t_show_event = [[MCIPhonePickEventDelegate alloc] init];
539+
com_runrev_livecode_MCIPhonePickEventDelegate *t_show_event;
540+
t_show_event = [[com_runrev_livecode_MCIPhonePickEventDelegate alloc] init];
541541
[t_show_event showViewEvent:t_ns_event withResult: t_ns_result];
542542
if (t_ns_result != nil)
543543
t_result = MCStringCreateWithCFString((CFStringRef)t_ns_result, r_result);
@@ -550,8 +550,8 @@ bool MCSystemCreateEvent(MCStringRef& r_result)
550550
{
551551
bool t_result = false;
552552
NSString* t_ns_result = nil;
553-
MCIPhonePickEventDelegate *t_create_event;
554-
t_create_event = [[MCIPhonePickEventDelegate alloc] init];
553+
com_runrev_livecode_MCIPhonePickEventDelegate *t_create_event;
554+
t_create_event = [[com_runrev_livecode_MCIPhonePickEventDelegate alloc] init];
555555
[t_create_event showCreateEvent: t_ns_result];
556556
if (t_ns_result.length > 0)
557557
t_result = MCStringCreateWithCFString((CFStringRef)t_ns_result, r_result);
@@ -564,8 +564,8 @@ bool MCSystemUpdateEvent(MCStringRef p_event_id, MCStringRef& r_result)
564564
bool t_result = false;
565565
NSString* t_ns_result = nil;
566566
NSString* t_ns_event = [NSString stringWithMCStringRef: p_event_id];
567-
MCIPhonePickEventDelegate *t_update_event;
568-
t_update_event = [[MCIPhonePickEventDelegate alloc] init];
567+
com_runrev_livecode_MCIPhonePickEventDelegate *t_update_event;
568+
t_update_event = [[com_runrev_livecode_MCIPhonePickEventDelegate alloc] init];
569569

570570
if (t_ns_event != nil)
571571
{
@@ -585,8 +585,8 @@ bool MCSystemGetEventData(MCExecContext &r_ctxt, MCStringRef p_event_id, MCArray
585585
bool t_result = false;
586586
NSString* t_ns_event = [NSString stringWithMCStringRef: p_event_id];
587587
MCCalendar t_event_result;
588-
MCIPhonePickEventDelegate *t_get_event;
589-
t_get_event = [[MCIPhonePickEventDelegate alloc] init];
588+
com_runrev_livecode_MCIPhonePickEventDelegate *t_get_event;
589+
t_get_event = [[com_runrev_livecode_MCIPhonePickEventDelegate alloc] init];
590590
t_event_result = [t_get_event getEventData: t_ns_event withGotData:t_result];
591591
// Convert the event structure to an array of pairs
592592
if (t_result == true)
@@ -600,8 +600,8 @@ bool MCSystemRemoveEvent(MCStringRef p_event_id, bool p_reocurring, MCStringRef&
600600
bool t_result = false;
601601
NSString* t_ns_result = NULL;
602602
NSString* t_ns_event = [NSString stringWithMCStringRef: p_event_id];
603-
MCIPhonePickEventDelegate *t_delete_event;
604-
t_delete_event = [[MCIPhonePickEventDelegate alloc] init];
603+
com_runrev_livecode_MCIPhonePickEventDelegate *t_delete_event;
604+
t_delete_event = [[com_runrev_livecode_MCIPhonePickEventDelegate alloc] init];
605605
[t_delete_event deleteEvent: t_ns_event withInstances:p_reocurring withResult: t_ns_result];
606606
if (t_ns_result != NULL)
607607
t_result = MCStringCreateWithCFString((CFStringRef)t_ns_result, r_event_id_deleted);
@@ -614,8 +614,8 @@ bool MCSystemAddEvent(MCCalendar p_new_calendar_data, MCStringRef& r_result)
614614
{
615615
bool t_result = false;
616616
NSString* t_ns_result = NULL;
617-
MCIPhonePickEventDelegate *t_add_event;
618-
t_add_event = [[MCIPhonePickEventDelegate alloc] init];
617+
com_runrev_livecode_MCIPhonePickEventDelegate *t_add_event;
618+
t_add_event = [[com_runrev_livecode_MCIPhonePickEventDelegate alloc] init];
619619
[t_add_event addEvent: p_new_calendar_data withResult: t_ns_result];
620620
if (t_ns_result != NULL)
621621
t_result = MCStringCreateWithCFString((CFStringRef)t_ns_result, r_result);
@@ -627,8 +627,8 @@ bool MCSystemGetCalendarsEvent(MCStringRef& r_result)
627627
{
628628
bool t_result = false;
629629
NSString* t_ns_result = NULL;
630-
MCIPhonePickEventDelegate *t_get_calendars_event;
631-
t_get_calendars_event = [[MCIPhonePickEventDelegate alloc] init];
630+
com_runrev_livecode_MCIPhonePickEventDelegate *t_get_calendars_event;
631+
t_get_calendars_event = [[com_runrev_livecode_MCIPhonePickEventDelegate alloc] init];
632632
[t_get_calendars_event getCalendarsEvent: t_ns_result];
633633
if (t_ns_result != NULL)
634634
t_result = MCStringCreateWithCFString((CFStringRef)t_ns_result, r_result);
@@ -659,8 +659,8 @@ bool MCSystemFindEvent(MCDateTime p_start_date, MCDateTime p_end_date, MCStringR
659659
}
660660
if (t_start_date != NULL && t_end_date != NULL)
661661
{
662-
MCIPhonePickEventDelegate *t_find_event;
663-
t_find_event = [[MCIPhonePickEventDelegate alloc] init];
662+
com_runrev_livecode_MCIPhonePickEventDelegate *t_find_event;
663+
t_find_event = [[com_runrev_livecode_MCIPhonePickEventDelegate alloc] init];
664664
[t_find_event findEvent:t_start_date andEnd: t_end_date withResult: t_ns_result];
665665
if (t_ns_result != NULL)
666666
t_result = MCStringCreateWithCFString((CFStringRef)t_ns_result, r_result);

engine/src/mbliphonecamera.mm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
////////////////////////////////////////////////////////////////////////////////
3838

3939
// MM-2013-09-23: [[ iOS7 Support ]] Added missing delegates implemented in order to appease llvm 5.0.
40-
@interface MCIPhoneImagePickerDialog : UIImagePickerController<UIImagePickerControllerDelegate, UIPopoverControllerDelegate, UINavigationControllerDelegate>
40+
@interface com_runrev_livecode_MCIPhoneImagePickerDialog : UIImagePickerController<UIImagePickerControllerDelegate, UIPopoverControllerDelegate, UINavigationControllerDelegate>
4141
{
4242
bool m_cancelled;
4343
bool m_running;
@@ -52,9 +52,9 @@ @interface MCIPhoneImagePickerDialog : UIImagePickerController<UIImagePickerCont
5252
}
5353
@end
5454

55-
static MCIPhoneImagePickerDialog *s_image_picker = nil;
55+
static com_runrev_livecode_MCIPhoneImagePickerDialog *s_image_picker = nil;
5656

57-
@implementation MCIPhoneImagePickerDialog
57+
@implementation com_runrev_livecode_MCIPhoneImagePickerDialog
5858

5959
- (void)setMaxWidth:(int32_t)mwidth maxHeight:(int32_t)mheight
6060
{
@@ -154,7 +154,7 @@ - (void)preWait
154154
// AL-2013-10-04 [[ Bug 11255 ]] Uninitialised variable can cause crash in iPhonePickPhoto
155155
id t_popover = nil;
156156
uint32_t t_orientations;
157-
t_orientations = [[MCIPhoneApplication sharedApplication] allowedOrientations];
157+
t_orientations = [[MCIPhoneGetApplication() sharedApplication] allowedOrientations];
158158
bool t_allowed_landscape = false;
159159
bool t_allowed_portrait_upside_down = false;
160160

@@ -224,13 +224,13 @@ + (void)prepare
224224
}
225225

226226
if (s_image_picker == nil)
227-
s_image_picker = [[MCIPhoneImagePickerDialog alloc] init];
227+
s_image_picker = [[com_runrev_livecode_MCIPhoneImagePickerDialog alloc] init];
228228

229229
}
230230

231231
+ (NSData *)showModalForSource: (UIImagePickerControllerSourceType)sourceType deviceType: (UIImagePickerControllerCameraDevice)deviceType maxWidth: (int32_t)maxWidth maxHeight: (int32_t)maxHeight
232232
{
233-
MCIPhoneCallSelectorOnMainFiber([MCIPhoneImagePickerDialog class], @selector(prepare));
233+
MCIPhoneCallSelectorOnMainFiber([com_runrev_livecode_MCIPhoneImagePickerDialog class], @selector(prepare));
234234

235235
s_image_picker -> m_running = true;
236236
s_image_picker -> m_cancelled = true;
@@ -302,7 +302,7 @@ bool MCSystemAcquirePhoto(MCPhotoSourceType p_source, int32_t p_max_width, int32
302302
map_photo_source_to_source_and_device(p_source, t_source_type, t_device_type);
303303

304304
NSData *t_ns_image_data;
305-
t_ns_image_data = [MCIPhoneImagePickerDialog showModalForSource: t_source_type deviceType: t_device_type maxWidth: p_max_width maxHeight: p_max_height];
305+
t_ns_image_data = [com_runrev_livecode_MCIPhoneImagePickerDialog showModalForSource: t_source_type deviceType: t_device_type maxWidth: p_max_width maxHeight: p_max_height];
306306

307307
if (t_ns_image_data != nil)
308308
{

engine/src/mbliphonecontact.mm

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ bool MCContactFindContact(MCStringRef p_person_name, MCStringRef &r_chosen)
819819

820820
////////////////////////////////////////////////////////////////////////////////
821821

822-
@interface MCIPhoneContactDelegate : NSObject
822+
@interface com_runrev_livecode_MCIPhoneContactDelegate : NSObject
823823
{
824824
bool m_running, m_finished, m_success;
825825
UINavigationController *m_navigation;
@@ -831,7 +831,7 @@ - (void)dealloc;
831831

832832
@end
833833

834-
@implementation MCIPhoneContactDelegate
834+
@implementation com_runrev_livecode_MCIPhoneContactDelegate
835835

836836
- (id)init
837837
{
@@ -890,7 +890,7 @@ - (void)dismissController
890890

891891
////////////////////////////////////////////////////////////////////////////////
892892

893-
@interface MCIPhonePickContactDelegate : MCIPhoneContactDelegate <ABPeoplePickerNavigationControllerDelegate>
893+
@interface com_runrev_livecode_MCIPhonePickContactDelegate : com_runrev_livecode_MCIPhoneContactDelegate <ABPeoplePickerNavigationControllerDelegate>
894894
{
895895
ABPeoplePickerNavigationController *m_pick_contact;
896896
}
@@ -900,7 +900,7 @@ - (void)dealloc;
900900

901901
@end
902902

903-
@implementation MCIPhonePickContactDelegate
903+
@implementation com_runrev_livecode_MCIPhonePickContactDelegate
904904

905905
- (id)init
906906
{
@@ -1024,7 +1024,7 @@ - (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationContr
10241024

10251025
////////////////////////////////////////////////////////////////////////////////
10261026

1027-
@interface MCIPhoneShowContactDelegate : MCIPhoneContactDelegate <ABPersonViewControllerDelegate>
1027+
@interface com_runrev_livecode_MCIPhoneShowContactDelegate : com_runrev_livecode_MCIPhoneContactDelegate <ABPersonViewControllerDelegate>
10281028
{
10291029
ABPersonViewController *m_view_contact;
10301030
}
@@ -1034,7 +1034,7 @@ - (void)dealloc;
10341034

10351035
@end
10361036

1037-
@implementation MCIPhoneShowContactDelegate
1037+
@implementation com_runrev_livecode_MCIPhoneShowContactDelegate
10381038

10391039
- (id)init
10401040
{
@@ -1161,7 +1161,7 @@ - (BOOL)personViewController:(ABPersonViewController *)personViewController shou
11611161

11621162
////////////////////////////////////////////////////////////////////////////////
11631163

1164-
@interface MCIPhoneCreateContactDelegate : MCIPhoneContactDelegate <ABNewPersonViewControllerDelegate>
1164+
@interface com_runrev_livecode_MCIPhoneCreateContactDelegate : com_runrev_livecode_MCIPhoneContactDelegate <ABNewPersonViewControllerDelegate>
11651165
{
11661166
ABNewPersonViewController *m_get_contact;
11671167
}
@@ -1171,7 +1171,7 @@ - (void)dealloc;
11711171

11721172
@end
11731173

1174-
@implementation MCIPhoneCreateContactDelegate
1174+
@implementation com_runrev_livecode_MCIPhoneCreateContactDelegate
11751175

11761176
- (id)init
11771177
{
@@ -1240,7 +1240,7 @@ - (void)newPersonViewController:(ABNewPersonViewController *)newPersonViewContro
12401240

12411241
////////////////////////////////////////////////////////////////////////////////
12421242

1243-
@interface MCIPhoneUpdateContactDelegate : MCIPhoneContactDelegate <ABUnknownPersonViewControllerDelegate>
1243+
@interface com_runrev_livecode_MCIPhoneUpdateContactDelegate : com_runrev_livecode_MCIPhoneContactDelegate <ABUnknownPersonViewControllerDelegate>
12441244
{
12451245
ABUnknownPersonViewController *m_update_contact;
12461246
}
@@ -1250,7 +1250,7 @@ - (void)dealloc;
12501250

12511251
@end
12521252

1253-
@implementation MCIPhoneUpdateContactDelegate
1253+
@implementation com_runrev_livecode_MCIPhoneUpdateContactDelegate
12541254

12551255
- (id)init
12561256
{
@@ -1379,8 +1379,8 @@ bool MCSystemPickContact(int32_t& r_result) // ABPeoplePickerNavigationControlle
13791379
{
13801380
bool t_success = true;
13811381

1382-
MCIPhonePickContactDelegate *t_pick_contact = nil;
1383-
t_success = nil != (t_pick_contact = [[MCIPhonePickContactDelegate alloc] init]);
1382+
com_runrev_livecode_MCIPhonePickContactDelegate *t_pick_contact = nil;
1383+
t_success = nil != (t_pick_contact = [[com_runrev_livecode_MCIPhonePickContactDelegate alloc] init]);
13841384

13851385
if (t_success)
13861386
t_success = [t_pick_contact showPickContact: r_result];
@@ -1395,8 +1395,8 @@ bool MCSystemShowContact(int32_t p_contact_id, int32_t& r_result) // ABPersonVie
13951395
{
13961396
bool t_success = true;
13971397

1398-
MCIPhoneShowContactDelegate *t_view_contact = nil;
1399-
t_success = nil != (t_view_contact = [[MCIPhoneShowContactDelegate alloc] init]);
1398+
com_runrev_livecode_MCIPhoneShowContactDelegate *t_view_contact = nil;
1399+
t_success = nil != (t_view_contact = [[com_runrev_livecode_MCIPhoneShowContactDelegate alloc] init]);
14001400

14011401
if (t_success)
14021402
t_success = [t_view_contact showViewContact:p_contact_id withResult: r_result];
@@ -1411,8 +1411,8 @@ bool MCSystemCreateContact(int32_t& r_result) // ABNewPersonViewController
14111411
{
14121412
bool t_success = true;
14131413

1414-
MCIPhoneCreateContactDelegate *t_create_contact = nil;
1415-
t_success = nil != (t_create_contact = [[MCIPhoneCreateContactDelegate alloc] init]);
1414+
com_runrev_livecode_MCIPhoneCreateContactDelegate *t_create_contact = nil;
1415+
t_success = nil != (t_create_contact = [[com_runrev_livecode_MCIPhoneCreateContactDelegate alloc] init]);
14161416

14171417
if (t_success)
14181418
t_success = [t_create_contact showCreateContact:r_result];
@@ -1431,9 +1431,9 @@ bool MCSystemUpdateContact(MCArrayRef p_contact, MCStringRef p_title, MCStringRe
14311431
ABRecordRef t_contact = nil;
14321432
t_success = MCCreatePerson(p_contact, t_contact);
14331433

1434-
MCIPhoneUpdateContactDelegate *t_update_contact = nil;
1434+
com_runrev_livecode_MCIPhoneUpdateContactDelegate *t_update_contact = nil;
14351435
if (t_success)
1436-
t_success = nil != (t_update_contact = [[MCIPhoneUpdateContactDelegate alloc] init]);
1436+
t_success = nil != (t_update_contact = [[com_runrev_livecode_MCIPhoneUpdateContactDelegate alloc] init]);
14371437
if (t_success)
14381438
t_success = [t_update_contact showUpdateContact:t_contact
14391439
withTitle:p_title withMessage:p_message withAlternateName:p_alternate_name

0 commit comments

Comments
 (0)