Limiting the monitor to a region in Linux [closed] - c++

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a laptop with a broken 13 inch display. The left half of the display is completely black and I cant's fix it for now. I was wondering if it's possible to write a program in any language to limit the display to the right, that means either:
Changing the resolution to have half of the width it currently has or
Keep the aspect ratio but zoom out the display and send it to the right.
I am preferably looking for a method that can be used in Linux (Windows will be in second priority)
The language is not an issue (though I am assuming C++ would be the way to go) and I'm looking for some hints.
Thanks in advance.

maybe (if xrandr don't make you happy) you could use Xnest, position the Xnest root window appropriately, and run all other X11 applications inside that Xnest.

You can change resolution using xrandr Linux command.

Related

How would I grab image data from display output of amd gpus? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I am attempting to create a personal PC streaming application on Windows. I was wondering how I could grab data from an AMD GPUs display output in C++ 11 (somewhat like OBS)? I attempted this in java with Robot.createScreenCapture method but was not able to achieve sufficient speeds required for streaming. I hope this is clear enough. Anything helps, thanks.
AMD AMF SDK can get you this: Is there a functionality to capture screen directly and encode at GPU buffer memory?
amf\public\src\components\DisplayCapture already has code which is basically wrapping DD API into AMF component. If my memory serves me right DVR sample shows how to use it (source code definitely has traces that it was/is working).

Detecting if a coordinate on the screen is an interact-able. [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
This is regarding the C/C++ language ->
Is there some kind of Windows API that checks if a given position on the screen is clickable? For example, the windows icon on the bottom left, the red X on the top right of a program, or maybe the "enter" button in a web browser's search engine.
This sounds a bit complex, but maybe through IPC there's a way to do something like this? Thanks!
EDIT: By clickable, i mean anything you can associate with / interact with.
Almost anything on screen is clickable (except things that hit-test as HTERROR, HTNOWHERE and HTTRANSPARENT).
The sane approach is to use UI Automation/MSAA. Call WindowFromPoint, ChildWindowFromPoint or RealChildWindowFromPoint to get a HWND and then call AccessibleObjectFromWindow to get a IAccessible interface and call accDoDefaultAction.
A less sane option is to use WM_NCHITTEST to figure out what the mouse is over and send some fake WM_NCLBUTTON* messages.

Fast Screen Transfer [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
What is the fastest way in C++ to share screens between computers, like in Skype or Google Plus? Currently I'm taking a screenshot, convert it to low-quality JPG with GDI+ and then send it too a remote computer, but although it works, it is not very fast (7 FPS via localhost).
I can't comment :(
But some things to think about.
Which operation(s) take the most time? I suspect this would be the capture due to the localhost xmission - but it really could be anything. Benchmark.
Does the sender "block" the next frame generation while waiting on the recipient display? If this is so then it might add in an implict bottleneck. The sender probably wants to keep sending frames unless the recipient requests a throttle.
If bandwidth is an issue, what about only sending partial or delta frames? Even though localhost shouldn't be a bandwidth issue, I am fairly certain that this is done in more advanced clients.
Consider looking at some [open source] VNC clients for how they work. It's not necessarily the same as "Skype", but it shound provide insight for a screen sharing program.

Get coordinates of two mouses separately in C++ [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm having two mouses on my PC, and now I want to get their positions at the same time. Can I do this through programming?
Thanks!
In Windows you cant, because you can only get the Position of the Cursor which is controlled by every mice.
On Linux, it's definitely possible to control one cursor with two devices. For instance I have a touchscreen and a mouse, the most recent one to be used moves the cursor.
This Question talks about a package which allows 2 cursors on Ubuntu.

Writing your own version of windows [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Recently, I've been thinking about how there are multiple versions of linux and how they are all built on a similar kernel. And I was wondering if it was possible with Windows. In this case I am thinking of having the first program loaded after the kernel has booted up and started all the devices, would be the what pops up instead of the windows login screen.
The reason for this is because I was wondering if it was possible to have the system render all the objects on the screen in a distint styling, but still process it as if it were running on a normal windows machine.
Any Thoughts?
Initially I thought this was a naive question, but Mooing Duck's link in the comments proved insightful. There are projects that do just this: EmergeDesktop, SharpE, even the KDE.
They're open and on sourceforge, go get them and dink around to your hearts content.
I'm not sure that the login screen is part of the shell however. So your alternate shell would only show up after you log in.
However, in the long run, alternate shells have no hope of competition. Microsoft controls the environment and they don't play too nice with competition.