Set playbook native application orientation - c++

I've been looking for a long time and I can't seem to figure out how to set the preferred orientation of an application for Playbook/BB10 using the native SDK.
My application is targeting playbook and BB10 handsets. The application needs to be in landscape for both devices. I'm using Native SDK Version 10.0.4.
I've looked into bps/orientation.h and it seems like it only has functions to retrieve this information, and there's a lot of areas inside screen that seem like they might have something to do with the orientation but I'm not sure.
Anybody else run into this?

I am not sure if you are still looking for this information but to specify the initial orientation of your application, you use the initialWindow tag in your application descriptor file (also called a bar-description.xml file). The following code shows what tags to add to make the orientation of your app initially be in landscape (aspectRatio), and not allow users to change the orientation (autoOrients)
<initialWindow>
<aspectRatio>landscape</aspectRatio>
<autoOrients>false</autoOrients>
</initialWindow>
There is more information on the autoOrients tag at the official blackberry site: https://developer.blackberry.com/native/documentation/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/r_barfile_dtd_ref_autoorients.html
The entire DTD can be found here: developer.blackbery.come/native

See if this helps:
Playbook Orientation

The orientation is determined by the accelerometer and the OS "lock orientation" setting.
Your application is not required to rotate itself to match the orientation, although this is recommended. If you don't the system bezel swipes won't match the orientation used by your application, probably resulting in a confused user.

Related

Blink browser engine example with Cmake?

I've been trying to build the Blink browser engine without any luck. Does anyone know how to create a simple window in Linux that opens an URL or renders an HTML file?
I'd suggest having a look at CEF library which enables just that - rendering content in window using, as a part of it, the Blink engine.
When it comes to running the engine itself it's tricky - mostly becase Blink can do little on its own, most of the functionality is provided by Chromium platform - this includes network I/O, fonts and images processing, rendering, user input handling and so on.

Which trigger should I use for UWP app to be persistently in the background

I am trying to make a simple app that would work with the Corsair SDK to change the colors of my keyboard programmatically. I've developed a simple one that uses straight Win32 API that uses a notification icon to hold the process and allow me to stop it.
I'm trying to make a UWP equivalent of the application using C++ as well. The thing I am looking for is the appropriate trigger so that I can run it in the background as soon as I have it installed much like the "Mail" app that runs in the background and can create notifications (which I won't be doing yet).
Also I would like it that I don't have any forms (or at most have it integrated with Settings)
However for now, I would just like to figure out which trigger should I use?
I was thinking of SystemTrigger::userPresent and SystemTrigger::userNotPresent (to show a different lighting effects on my keyboard depending on whether the user is present or not).
The only thing different between the two modes if when the user is present, I will take in the keyboard states and read some user specific settings.

Windows Mobile 6.5 Change the camera focus

I have a project to scan some QR-code or bar-code with camera on windows mobile. (phone x01t)
Programing in C++ and using DirectShow.
Tired to change focus with IAMCameraControl interface, but return the error like "...request is not supported".
Are there any way else?
Thanks
Most (if not all) Windows Mobile phones I've used so far used custom camera drivers, which means OEMs decide which functionalities to implement/support. IAMCameraControl is most likely not one of them.
However, you might want to look for OEM-specific SDKs. For instance, Samsung provides custom APIs enabling to change such parameters as camera focus or ISO. Maybe such APIs exist for your device.

How can I code my own custom splash screen for Linux?

This is NOT a question on plain old boring customization; I actually want to create an program, you know, with source code, etc...
I'm thinking about programming my own media centre interface, and I figured it'd look better if I coded my own splash screen for when the OS is loading.
Note: The media centre interface will be run in X, but this question is regarding what will happen before the X server loads.
Simply, I'd like to make a splash screen application to hide the linux kernel boot messages. Is there a way I can program some animation in to this like some sort of animated progress bar for example? I assume that I won't be able to code any 2D/3D graphics (as that'd require X to be running, right?), so how would I go about generating that?
I'd prefer to do this in C++, but C is also an option.
Note: I'm not looking to use any existing "themes" or anything like that, just interested in the programming side of things.
Update:
Some suggestions have been to use standard images (.bmp, .jpeg, etc), I am not interested in loading images in to an existing application. But obviously I may want to load images in to the boot screen application that I will make.
I'm not tied to a Linux distro, so this can be for anything, although Debian or a Debian-based distro would be nice.
I like the suggestion about loading the X server early and running a loading screen from there, however is there not a more direct approach? Surely you can make a program which hides the boot messages and shows a custom program? Obviously this would be very low level programming, but that's what I'm looking for...
Also, I'm not interested in altering the boot loader (LILO, GRUB, etc).
Update 2:
So far good suggestions have been looking at the source code for applications like splashy and fbsplash. Can anyone better this suggestion?
For the graphical output you can use the Linux framebuffer, for application development you can use gtk which support rendering directly to the framebuffer GtkFB.
For the video and such you can use mplayer which also support rendering to the framebuffer.
For the initialization you have to look around the system used, debian uses a sysv init style initialization http://www.debian-administration.org/articles/212, ubuntu uses upstart.
I'd look into splashy source code. But you will need to code in C.
If you have the skills, you can implement a software based 3D engine (like in the good old days). A simple rotating cube shouldn't be very hard to code and there are tons of tutorials.
The downside is that you will increase the boot time, something not very pleasant in a media center.
Here's the thing: there is a library/kernel patch, fbsplash, that has already been written to do exactly what it sounds like you want to do. It will display an image in place of the normal boot messages, and it can also incorporate a progress bar. When you're trying to do something for which a well-established open-source implementation already exists, there's really no better way to learn how to do it yourself than to look at the source code.
Even if you're looking for something more complicated (say if you want to create some fancier animation than a progress bar), you might be able to start with fbsplash and modify it to suit your needs.
There are several ways you could do this. You could have the X server load very early, and just write a program to display the splash screen. You could also use the framebuffer device. If you are using Intel hardware, or are willing to use the OSS AMD drivers, or Nouveau for Nvidia, you could use kernel mode setting. For this, I would look at Fedora's Plymouth. You could just write a Plymouth plugin to display your splash screen.
The splash screen is simply an image (.bmp, .jpg, etc.) and can be loaded by the boot loader. Since you haven't specified the distribution you're using, look into LILO, grub, or whichever one is appropriate. Check the /boot directory for clues that will direct your search.
If all you want to do is have a nice clean boot sequence with your own splash and absolutely no boot messaging you can do the following:
First, silence grub, boot messaging, and console cursor:
GRUB_CMDLINE_LINUX_DEFAULT = quiet fastboot splash vt.cur_default=1 loglevel=0
GRUB_TIMEOUT = 0
This will very quickly and silently (fade to black) bring you to your login screen, where you can place a splash. Your distro may show it's own splash briefly, which you can change if you like.
This yeilds a professional clean boot sequence, without all the usual linux warts and wrinkles. (Like OSX and Windows).
I personally use Ubunutu with LXDE, and have a clean splashy boot in under 3 seconds, even on older hardware.

Change Windows Mobile 6.1 Theme Programmatically

I am trying to figure out the proper procedure for applying a new tsk based theme file in windows mobile 6.1.
I have tried working off of the page http://www.pocketpcdn.com/articles/changetodaytheme.html But this only changes the background, not the system colors for things such as the top and bottom bars on the screen.
wceload.exe seems to work perfectly for some tsk's and partially for others.
Does anyone know more about tsk files and applying them programmatically in Windows Mobile 6.1?
My application is an open source application, the code is avail;able via read only svn, feel free to check it out # google code
I ended up finding a solution, I don't think it is a universal solution though.
Calling "\Windows\cusTSK.exe \Windows\ThemeName.tsk" changes the top and bottom bars, but does not change all apsects of the theme... so calling wceload.exe and then calling cuTSK.exe in that order seems to be able to change the theme using all tsk files that I have tested.
The cusTSK.exe binary does not exist on the Windows Mobile 6.1 Professional emulator image that you can download from msdn, so I think that this file that exists on custom roms and HTC made devices, that is why I do not think this is a universal solution, but it works for my purposes