Windows 8 manipulate tiles - windows-8

Can I manipulate the tiles from C++ application (through WinAPI/WinRT, register or something else)?

Your question is very unspecific. Look at these samples 1 and 2 to get started with Tiles and C++. If you've got a more specific/detailed question feel free to ask.
Edit: (method names and namespaces are from c# but should be ~equal in c++)
Primary tiles can only be deleted by the user.
You can access limited WinRT functionality out of an non MetroApp. But as far as I know there is no way to delete foreign tiles in the "limited" WinRT.
If you want to delete secondary tiles you have to use Windows.UI.StartScreen.SecondaryTile.FindAllAsync("id of the app tiles belong to"); and then call tile.RequestDeleteAsync() for each tile in the result you want to remove. Note that every delete request must be accepted by user. As already mentioned Windows.UI.StartScreen namespace is only available out of metro apps.

Related

What OS X events can I access programmatically from Swift?

I'd like to find both current running programs (or at least program in the foreground) programmatically - and also key events on OS X.
I found inter-application communication guidelines, but they don't seem to say I can find out what applications are running.
I've found key events, but it seems to imply that the current task in the forefront is the one that gets the key events and only if it doesn't handle them does it go up to event chain. I'd like to programmatically intercept them.
Seems dubious, I know. I'm trying to use key events along with screen captures to try to best learn text on the screen - it's for research.
I'm using swift, but I understand that an obj-c example is pretty helpful since they all use the same libraries.
To get a list of running applications use:
NSWorkspace.sharedWorkspace().runningApplications
You can build a key logger (so to speak) by creating an event monitor (same document you linked, just a different section).

Tiles and Live Tiles in Windows phone 8

Is there any difference between Tile and Live tiles in windows 8 phone.
or we can use both interchangeably.
I googled it but not finds any satisfy results.
This really depends (not actually, but let's assume it this time) on the template for the tile you choose. If the template exists for both WP8 and W8, then the code allowing it to actually do anything looks the same if you utilize C/C++, C# or Visual basic. BUT, most of the templates (XML) does have some differences so most of them will need som opt-ins by you to work on different platforms. So, the short answer is no, they do not work interchangeably and the long one is yes, if you modify the parser (which you can, but should not do!).
Alex

Share a "deep link" from a Windows 8/WinRT application

I have searched using many different terms and phrases, and waded through many pages of results, but I have (remarkably) not seen anyone else addressing, even asking, about, this issue. So here goes...
Ultimate Goal: Allow a user viewing a content-based page (may contain both text and images) within a Windows Store app to share that content with someone else.
Description
I am working on taking a fair amount of content and making it available for browsing/navigating as a Windows 8/WinRT/Windows Store (we need a consistent name here) application. One of the desired features is to take advantage of the Share Charm, such that someone viewing a page could share that page with someone else.
The ideal behavior is for the application to implement the Share Source contract which would share an email message that contained some explanatory text, a link to get the app from the Windows Store, and a "deep link" into the shared page in the application.
Solutions Considered
We had originally looked at just generating a PDF representation of the page, but there are very few external libraries that would work under WinRT, and having to include externally licensed code would be problematic as well. Writing our own PDF generation code would out of scope.
We have also considered generating a Word document or PowerPoint slide using OpenXML, but again, we run up against the limitaions of WinRT. In this case, it is highly unlikely the OpenXML SDK is useable in a WinRT application.
Another thought was to pre-generate all of the pages as .pdf files, store them as resources, and when the Share Charm is invoked, share the .pdf file associated with the current page. The problem here is the application will have at least 150 content pages, and depending on how we break the content down, up to over 600. This would likely cause serious bloat.
Where We Are At
Thus we have come to sharing URIs. From what I can tell, though, the "deep linking" feature is only intended for use on Secondary Tiles tied to your application. Another avenue I considered was registering a protocol like, "my-special-app:" with the OS and having it fire up the application but that would require HKCR registry access, which is outside the WinRT sandbox.
If it matters, we are leaning towards an HTML/JS application, rather than XAML/C#, because the converted content will all be in HTML and the WebView control in WinRT is fairly limited. This decision is not yet final, though.
Conclusion
So, is this possible, and if so, how would it be done or where can I find documentation on it?
Thanks,
Dave Parker

iTunes / About This Mac Storage Capacity Bars

I'm trying to find out if it's possible to recreate the capacity bars in Lion, like so...
http://thenextweb.com/files/2011/07/about-this-mac-storage.png
I've seen third party apps (such as Windows Phone 7 Connector) using an identical control. Is there an official way to do this?
It's a custom view. So the only "official" way to do it is to subclass NSView and go crazy in drawRect:.
You might as well start with the official documentation on the subject.
After that, there are numerous tutorials and such on the web. This one isn't half bad.

How to develop an app for Mac OS X that keeps reading everything the user types in?

I'm here to ask if any of you know how to develop an app for Mac OS X that keeps reading everything the user types in. An example of app that implements this behavior is Text Expander.
Text Expander reads everything the user types in, searching for abbreviations previously added on it. When one of this abbreviations is found, Text Expander replace the abbreviation form for the entire content related to that abbreviation.
So, I would like to know what resource of Objective-C or Cocoa let you do this kind of stuff.
P.S.: Just to mention, I'm not thinking about developing something like a key logger. I'm just curious and thinking about at developing a snippet platform.
This can be done with CGEventTap, but it requires that your process is running as root or “access for assistive devices” is enabled.
Check up on Services:
http://homepage.mac.com/simx/technonova/tips/creating_a_service_for_mac_os_x.html
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/SysServices/introduction.html
That is one way to achieve this.