Giter VIP home page Giter VIP logo

starbackground's Introduction

starbackground's People

Contributors

darclander avatar slnxc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

starbackground's Issues

Update readme

It has come to my understanding that the readme is incomplete since not everyone can follow it and properly setup the project. (Which to me might be hard to see since I know what I need to do). Therefore we should update the readme to facilitate the setup for new contributors / developers.

  • Find key concepts which should exist in the readme.
  • Update readme accordingly.
  • Add more informative steps to make it easier to keep up with the steps.

Error retrieving HWND

For some versions of windows (incorrectly installed or non-purchased versions) it seems like the function get_wallpaper_window()
does not return a correct HWND to the windows wallpaper but instead returns 0.

https://github.com/darclander/starBackground/blob/main/src/ui.cpp

HWND get_wallpaper_window() {
        // Fetch the Progman window
        HWND progman = FindWindow("ProgMan", NULL);
        // Send 0x052C to Progman. This message directs Progman to spawn a 
        // WorkerW behind the desktop icons. If it is already there, nothing 
        // happens.
        SendMessageTimeout(progman, 0x052C, 0, 0, SMTO_NORMAL, 1000, nullptr);
        // We enumerate all Windows, until we find one, that has the SHELLDLL_DefView 
        // as a child. 
        // If we found that window, we take its next sibling and assign it to workerw.
        HWND wallpaper_hwnd = nullptr;
        EnumWindows(EnumWindowsProc, (LPARAM)&wallpaper_hwnd);
        // Return the handle you're looking for.
        return wallpaper_hwnd;
}

Any solutions for this would be greatly appreciated.

  • Find the issue.
  • Fix it.

Window management

Currently the window management is handled with input to the application via argc in C++. The default value for 0 arguments is to set the window width: 1920 and height: 1080. A better solution would be to find the window dimensions and set the width / height accordingly.

  • Find a solution to retrieve window dimensions.
  • Use above solution to remove the default argument and use the retrieved dimensions.
  • Find multiple windows (monitors) and create a "big" window to display the background on.

Add image handler

Currently there is no solution for using .gif / .mp4 files as a moving background. Instead of only having the star-like moving background a further advancement would be to allow users to import different file-types which would be used instead as the moving background.

  • Create a class image handler which will handle different filetypes.
  • Allow the imported files to be transformed into a "moving background".
  • Add support for .gif files
  • Add support for .mp4 files

Return to original wallpaper

Once the program is stopped the background will remain as a still of the current background. (Instead of moving stars it will just be white dots standing still). An upgrade would be to save the current background(s) and reset the wallpaper to them on program exit.

  • Save current wallpapers in a buffer.
  • Set the previous wallpapers once the program halts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.