It seems it's possible to use screen.area_move because it is accomplished in the Pie Menu Editor addon and there's a thread on blenderartists.org where the author demonstrates using an operator from his addon to run screen.area_move. I'm wondering, how did he accomplish this?
#Just quickly converting the example code from the thread C = bpy.context a = C.area x = a.x + (a.width >> 1) y = a.y + a.height C.window.cursor_warp(x, y) #Replace Pie Menu Editor timeout operator (which I don't have access to) with timer app handler. #bpy.ops.pme.timeout(delay=0.0001, cmd="bpy.ops.screen.area_move(x=%d, y=%d, delta=-100)" % (x, y)) def move_area(): bpy.ops.screen.area_move(x=x, y=y, delta=-100) bpy.app.timers.register(move_area, first_interval=1)
I've tried emulating the code posted on the thread and substituted his timeout operator with a timer apphandler. The apphandler works, but the context is still not correct. Also no combination (that I've tried) of override context passed seems to work.
Examining Blender source screen_ops.c the only poll for the operator SCREEN_OT_area_move seems to be for the position of the cursor:
ot->poll = ED_operator_screen_mainwinactive; /* when mouse is over area-edge */
Which I've managed to provide but still doesn't seem to be enough. Anyone ever get this particular operator working, or in any way figure out how to programmatically change the x, y, width or height of an editor?