Re: [AD] iPhone specific additions

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On June 19, 2011, Trent Gamblin wrote:
> I want to add two very simple functions to the iphone port. These allow you
> to use Game Center in your games and I assume other screen overlay
> thingies like the on screen keyboard. The additions, minus declarations
> are here:
> 
> Index: allegroAppDelegate.m
> ===================================================================
> --- allegroAppDelegate.m	(revision 14796)
> +++ allegroAppDelegate.m	(working copy)
> @@ -18,6 +18,16 @@
>  static volatile bool waiting_for_program_halt = false;
>  static float scale_override = -1.0;
> 
> +UIWindow *al_iphone_get_window(void)
> +{
> +	return [global_delegate window];
> +}
> +
> +UIView *al_iphone_get_view(void)
> +{
> +	return [global_delegate view];
> +}
> +
>  static bool is_ipad(void)
>  {
>  #if (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)
> 
> 
> Basically just two accessors. I don't think there's any reason now to
> include them, but before I begin exposing some innards I figured I'd
> check. Elias has more experience with this than me.

If we're talking on screen keyboard support, I think the native dialog addon 
should probably include a function to pop it up on supported platforms (like 
iOS and Android). But other more specific things probably can't be added in 
that way, which would make these accessors useful.

> Trent
> ---------------------------------------------------------------------------
> --- EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/