Skip to content

Add current_window_position usage example#752

Open
RUNQILIU-123 wants to merge 3 commits into
thoth-tech:usage-examplesfrom
RUNQILIU-123:windows-position-example
Open

Add current_window_position usage example#752
RUNQILIU-123 wants to merge 3 commits into
thoth-tech:usage-examplesfrom
RUNQILIU-123:windows-position-example

Conversation

@RUNQILIU-123
Copy link
Copy Markdown

Summary

This pull request adds an initial usage example for current_window_position in the windows category.

Files added

  • current_window_position-1-example.cpp
  • current_window_position-1-example.py
  • current_window_position-1-example-top-level.cs
  • current_window_position-1-example-oop.cs
  • current_window_position-1-example.txt
  • current_window_position-1-example.gif

What the example does

This example opens a window and displays the current window position, current window X, and current window Y values in real time.

Testing

Tested by running:

  • C++ version
  • Python version

Verified that:

  • the window opens correctly
  • the current window position updates when the window is moved
  • the X and Y values change in real time

Notes

This is an interactive usage example for the current_window_position, current_window_x, and current_window_y functions in the windows category.
image

@netlify
Copy link
Copy Markdown

netlify Bot commented May 3, 2026

Deploy Preview for splashkit ready!

Name Link
🔨 Latest commit 8f8022a
🔍 Latest deploy log https://app.netlify.com/projects/splashkit/deploys/69f73f69354a8e0007a27e1e
😎 Deploy Preview https://deploy-preview-752--splashkit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

@222448082Ashen 222448082Ashen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description

This PR introduces new usage examples for KeyTyped, MouseClicked, and CurrentWindowPosition (including CurrentWindowX and CurrentWindowY). These examples provide a comprehensive look at handling user interactions and monitoring window states across C++, C#, and Python.

Type of change

  • Documentation (update or new)
  • Infrastructure (Deletion of legacy JSON registry in favor of dynamic scanning)

How Has This Been Tested?

  • Verified file structure in public/usage-examples/input/ and public/usage-examples/windows/.
  • Manually reviewed code logic for all implementations.
  • npm run build (Verified logic against the new dynamic scanning system).

Checklist

If involving code

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • My changes generate no new warnings

If involving Usage Examples

  • Example is registered (Verified dynamic scanner will detect these new files)
  • Includes examples for C++, C# (Top-level & OOP), and Python
  • Image (.png) or GIF (.gif) output is included
  • Files are organized correctly according to category

If involving structural / repo-wide changes

  • Infrastructure: This PR correctly removes usage-example-references.json, aligning with the project's transition to a dynamic folder scanner.

Copy link
Copy Markdown

@himanshigaba22 himanshigaba22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good examples overall! Just a few things to sort out before this can merge:

The .txt files should be title only - no description line
This PR has 3 examples bundled together, ideally keep one per PR going forward
Can you confirm if usage-example-references.json still needs updating or if the dynamic scanner has fully replaced it?
The current_window_position GIF is 25MB which is pretty large - worth compressing before merging

Once these are sorted, should be good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants