Is it possible to get the size of or resize a running program? - flutter

I would like to 'overlay' my application on top of another one, which would require me to resize that other program based on the size of mine. I'm currently using Flutter for my (cross-platform) application, and need to resize that other program based on the dimensions of my application.
In Flutter, I start a new process with Process.start("executable path") to start running the 'other program'. This creates a child process, but its window size and positions are not constrainable via my application.
I hope my 'problem' is a bit clear. Is there a way to achieve what I want in:
1: Flutter only (or perhaps another cross-platform framework?)
2: If not, how could I accomplish this using native APIs?

Related

Swift, how to resize, add padding and background to an image?

I'm trying to create so simple image processing on a macOS app using Swift, to start a have a file URL (e.g. "../myFiles/myFile.png"), I would like to add paddings to the image and give it a background.
Here is one example, this would be the original image:
And this is the final result I would like to obtain:
Any idea on how to achieve this (preferably applying shadows)?
P.S. I took a look into some swift libraries but they seem very low level (e.g. https://github.com/koher/swift-image), I don't know how to achieve what I want with them
For those looking for a solution using the native APIs the source code of my (now defunct app) is open source:
https://github.com/ospfranco/messer

Load a dynamic animation from disk in flutter

I am building a flutter application for a donation Kiosk, that would be deployed on tablets that connect to card readers.
I would like the home screen presented to users to contain a custom animation that can be loaded from a disk file (or downloaded) so that we could develop these custom animations for each NGO with ought building separate apps for each case.
The animation should be dynamic, meaning it should be able to take some parameters from the flutter app (ex: number of donations from the last 24h) and change the layout slightly (ex: show a number of trees based on that number).
I found some animation libraries but all of them would mean coding them inside the app, which is not the best scenario for us.
Is this possible? Can you help me by pointing in the right direction :)
Thank you!

Best way to fastly refresh text in a GTK window

I am building a GTK window with text that need to be updated, say 10 times per second, every time it receives a data from a GPS.
Which kind of widget should I use?
GTK-label is safe for this kind of operation or are there other more suitable widgets?
Thank you.
You could use a GtkDrawingArea and draw to it using cairo.
That way it could be way higher than 10 drawings/s.
Cairo has native text operations.
You could even design your own widget.
Even if you're using python or any other language that cairo and gtk have bindings for, thanks to "gobject introspection".

OSX position of specific window

I'm new to OS X programming, but what I'm looking to do is find the dimensions and positions of a specific window ( of a specific process) , then ultimately create a frame capture over that to simulate a screen recording of a specific application programmatically.
How does one find a specific window (Swift) , more specifically what API would I need. It appears the apple docs are a complete mess and I see several apis that touch on this functionality.
Any guidance or sample would be helpful here.

Porting iPhone UI with multiple screens over a map to Android. Use multiple Activities?

I have this setup in an iPhone app:
There is always a MKMapView on screen & a additional UI layer on top. The upper UI layer is managed by a simple state system. Each state is a UIViewController and has a .nib attached to it containing the layout.
I'm very new to Android development. What is the best way to build this on Android?
So far I see two options:
1. Have a single Activity & insert/remove layouts as the states change.
2. Have multiple Activities and have a layout for each. Is there then a way to keep a single MapView around beneath, without having one per activity?
Thanks.
In general, it is easier to have multiple activities, each with their own layout.
Before you get to far, make sure you read through the basic Android documentation and UI guidelines. Android has some UI paradigms that are a little bit different from the iPhone, so you generally don't want to just copy over exactly what you have.