Hi Scuri, Maybe this help. https://developer.android.com/reference/android/app/NativeActivity.html http://brian.io/android-ndk-r10c-docs/Programmers_Guide/html/md_2__samples_sample--nativeactivity.html https://github.com/googlesamples/android-ndk/blob/master/native-activity/app/src/main/cpp/main.cpp
Best regards, Ranier Vilela ________________________________________ De: Antonio Scuri <antonio.sc...@gmail.com> Enviado: terça-feira, 13 de dezembro de 2016 16:30 Para: IUP discussion list. Assunto: Re: [Iup-users] Android IUP implementation question/problem for IupDialog Hi, First I need to understand a little bit more about how Android does things. We can then adapt the IUP structure so it will be able to suit your needs. So after you create the native element, you tell me that you have to wait for an event when the element is actually created. In between can you set any properties on that element? I mean, what's the point in creating the element but it is not actually created at that time? What you can do after that and before the event? Can you send me a simple example in C for an Android application? So I can see how this creation process takes place. Best, Scuri On Tue, Dec 13, 2016 at 8:00 AM, Eric Wing <ewmail...@gmail.com<mailto:ewmail...@gmail.com>> wrote: Hi, I'm trying to prototype an Iup implementation for Android. I have implemented a basic Dialog and Button to try to get things going. But I realized there is a design problem that is blocking me... I am making IupDialog correspond to an Android Activity. By itself, this seems to work. However, the moment I try to add a widget to it (e.g. button), I realized there is a problem. When I create a new Android Activity, I do not get back an object immediately. I have to wait for the system to create the Activity some time later after this procedure returns. So in the Iup Dialog map function callback, I can create a new activity, but I cannot yet set the Ihandle->handle to anything yet. Meanwhile, I expect the Button map function callback to be invoked, but it appears that IUP's internals are skipping this because my ih->handle for the parent is still NULL. It appears that I need a way for IUP to defer its processing for IupShowDialog/IupMap until after I notify it that I got the OS event for the Activity creation, or I need a way to force re-run all the processing once I do get the OS event for the Activity creation. Can you give me some suggestions on how to deal with this? Thanks, Eric ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net<mailto:Iup-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/iup-users ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users