Comments (6)
I can make almost the same things on macOS, but I think we have to get most important and frequency used things and implement them.
from defos.
something like function
defos.set_window_mode(param)
and constants
defos.SHOW_MAXIMIZED
defos.SHOW_FULLSCREEN
defos.SHOW_WINDOWED
or something like this.
I am not sure about the cases of using : : window get focus, making taskbar blink / light up,
from defos.
Note: Shortcut for macOS is option key + shift + green button to get same behavior as clicking Maximize button on Windows.
I agree about important features. It's still good to list out everything we want. We'll probably want to rename some features / merge them and then do a 1.0 release then people can use that version statically so the names don't change. Then for 2.0 release and so on we can continue to refine name and list of features to what is best.
from defos.
WIP version going to add it in properly later
local M = {}
local ffi = package.preload.ffi()
function M.maximize_window()
if(ffi.os == "Windows") then
-- definitions
ffi.cdef([[
typedef unsigned int LONG;
typedef long long LONG_PTR;
typedef void* PVOID;
typedef PVOID HANDLE;
typedef HANDLE HWND;
typedef unsigned int UINT;
typedef bool BOOL;
HWND GetActiveWindow();
BOOL ShowWindow(HWND hWnd, int nCmdShow);
]])
-- load User32.dll
local user32 = ffi.load("User32")
local SW_SHOWMAXIMIZED = 3
local ptr = user32.GetActiveWindow()
user32.ShowWindow(ptr, SW_SHOWMAXIMIZED)
end
end
return M
from defos.
Fully agree with you about version 1.0 and 2.0 .
And thanks for the maximize option ( option key + shift + green button) I never known about it =)))
from defos.
As I undestand this issue is done?
new methods:
defos.toggle_maximize()
and
defos.is_maximize()
was added
from defos.
Related Issues (20)
- Implementing set_window_icon on Linux
- Game doesn't go full screen on the current screen on Windows
- Cursor doesn't hide on XFCE
- White flash on startup HOT 7
- Custom OS cursor breaking for macOS since recent update? HOT 12
- Need to change / improve method of setting HTML5 cursor
- Custom cursor images do not work in Microsoft Edge
- Multi monitor / tv setups can create issues with fullscreen mode HOT 2
- FPS cursor lock HOT 2
- Emscripten 1.39 support HOT 2
- hide cursor not working on mac HOT 2
- First input after toggling fullscreen not available on MacOS? HOT 1
- Should defos.on_click() be expanded to cover additional user interaction events? HOT 2
- Cross-platform custom cursors
- allow `clip cursor to game view area` for Linux HOT 1
- Set Window/View Size Before Game Start HOT 2
- Library stops project from building on linux HOT 8
- Changing the window title HOT 3
- Defos for dynamically scaling Defold game window in HTML5? HOT 2
- Toggling fullscreen re-enables window resize if previously disabled (Windows 10)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from defos.