diff options
author | David Robillard <d@drobilla.net> | 2019-08-04 20:19:01 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-09-03 08:34:39 +0200 |
commit | b0ac6dcb492b68404d800fe8ed0c7393d487fa4b (patch) | |
tree | 41d0050ef6d33bfe9f2186195168e36f8a8b8f3a /pugl/pugl.h | |
parent | 075c5c5927e511dd03d9608a285ed58ef395120b (diff) | |
download | pugl-b0ac6dcb492b68404d800fe8ed0c7393d487fa4b.tar.gz pugl-b0ac6dcb492b68404d800fe8ed0c7393d487fa4b.tar.bz2 pugl-b0ac6dcb492b68404d800fe8ed0c7393d487fa4b.zip |
Add puglSetClassName()
Diffstat (limited to 'pugl/pugl.h')
-rw-r--r-- | pugl/pugl.h | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/pugl/pugl.h b/pugl/pugl.h index 017338c..112b11b 100644 --- a/pugl/pugl.h +++ b/pugl/pugl.h @@ -454,6 +454,18 @@ PUGL_API void puglFreeWorld(PuglWorld* world); /** + Set the class name of the application. + + This is a stable identifier for the application, used as the window + class/instance name on X11 and Windows. It is not displayed to the user, + but can be used in scripts and by window managers, so it should be the same + for every instance of the application, but different from other + applications. +*/ +PUGL_API PuglStatus +puglSetClassName(PuglWorld* world, const char* name); + +/** Return the time in seconds. This is a monotonically increasing clock with high resolution. The returned @@ -523,12 +535,6 @@ PUGL_API void puglInitWindowHint(PuglView* view, PuglWindowHint hint, int value); /** - Set the window class name before creating a window. -*/ -PUGL_API void -puglInitWindowClass(PuglView* view, const char* name); - -/** Set the parent window before creating a window (for embedding). */ PUGL_API void @@ -797,6 +803,15 @@ puglDestroy(PuglView* view) } /** + Set the window class name before creating a window. +*/ +static inline PUGL_DEPRECATED_BY("puglSetClassName") void +puglInitWindowClass(PuglView* view, const char* name) +{ + puglSetClassName(puglGetWorld(view), name); +} + +/** Set the window size before creating a window. @deprecated Use puglSetFrame(). |