diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-20 11:37:23 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-20 11:37:23 +0300 |
commit | 2d81addf78d6a8b0fb2f2959b04a385c4adffdf2 (patch) | |
tree | 5e0f45b9c945499bc6a6669563de13c5203981a6 /src/app.h | |
parent | 201021092d204680b353c82ce9e9beb76f3044e8 (diff) |
Experimenting with independent popup windows
Toe dipping into multiple window support by allowing popup menu widgets to be displayed in independent windows.
This is not a 100% replacement for native menus, but it gets pretty close.
Diffstat (limited to 'src/app.h')
-rw-r--r-- | src/app.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -22,8 +22,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
22 | 22 | ||
23 | #pragma once | 23 | #pragma once |
24 | 24 | ||
25 | /* Application core: event loop, base event processing, audio synth. */ | ||
26 | |||
27 | #include <the_Foundation/objectlist.h> | 25 | #include <the_Foundation/objectlist.h> |
28 | #include <the_Foundation/string.h> | 26 | #include <the_Foundation/string.h> |
29 | #include <the_Foundation/stringset.h> | 27 | #include <the_Foundation/stringset.h> |
@@ -35,6 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
35 | iDeclareType(Bookmarks) | 33 | iDeclareType(Bookmarks) |
36 | iDeclareType(DocumentWidget) | 34 | iDeclareType(DocumentWidget) |
37 | iDeclareType(GmCerts) | 35 | iDeclareType(GmCerts) |
36 | iDeclareType(MainWindow) | ||
38 | iDeclareType(MimeHooks) | 37 | iDeclareType(MimeHooks) |
39 | iDeclareType(Periodic) | 38 | iDeclareType(Periodic) |
40 | iDeclareType(Root) | 39 | iDeclareType(Root) |
@@ -61,14 +60,12 @@ enum iAppEventMode { | |||
61 | enum iUserEventCode { | 60 | enum iUserEventCode { |
62 | command_UserEventCode = 1, | 61 | command_UserEventCode = 1, |
63 | refresh_UserEventCode, | 62 | refresh_UserEventCode, |
64 | arrange_UserEventCode, | ||
65 | asleep_UserEventCode, | 63 | asleep_UserEventCode, |
66 | /* The start of a potential touch tap event is notified via a custom event because | 64 | /* The start of a potential touch tap event is notified via a custom event because |
67 | sending SDL_MOUSEBUTTONDOWN would be premature: we don't know how long the tap will | 65 | sending SDL_MOUSEBUTTONDOWN would be premature: we don't know how long the tap will |
68 | take, it could turn into a tap-and-hold for example. */ | 66 | take, it could turn into a tap-and-hold for example. */ |
69 | widgetTapBegins_UserEventCode, | 67 | widgetTapBegins_UserEventCode, |
70 | widgetTouchEnds_UserEventCode, /* finger lifted, but momentum may continue */ | 68 | widgetTouchEnds_UserEventCode, /* finger lifted, but momentum may continue */ |
71 | immediateRefresh_UserEventCode, /* refresh even though more events are pending */ | ||
72 | }; | 69 | }; |
73 | 70 | ||
74 | const iString *execPath_App (void); | 71 | const iString *execPath_App (void); |
@@ -119,8 +116,9 @@ iAny * findWidget_App (const char *id); | |||
119 | void addTicker_App (iTickerFunc ticker, iAny *context); | 116 | void addTicker_App (iTickerFunc ticker, iAny *context); |
120 | void addTickerRoot_App (iTickerFunc ticker, iRoot *root, iAny *context); | 117 | void addTickerRoot_App (iTickerFunc ticker, iRoot *root, iAny *context); |
121 | void removeTicker_App (iTickerFunc ticker, iAny *context); | 118 | void removeTicker_App (iTickerFunc ticker, iAny *context); |
119 | void addPopup_App (iWindow *popup); | ||
120 | void removePopup_App (iWindow *popup); | ||
122 | void postRefresh_App (void); | 121 | void postRefresh_App (void); |
123 | void postImmediateRefresh_App(void); | ||
124 | void postCommand_Root (iRoot *, const char *command); | 122 | void postCommand_Root (iRoot *, const char *command); |
125 | void postCommandf_Root (iRoot *, const char *command, ...); | 123 | void postCommandf_Root (iRoot *, const char *command, ...); |
126 | void postCommandf_App (const char *command, ...); | 124 | void postCommandf_App (const char *command, ...); |
@@ -138,3 +136,5 @@ iDocumentWidget * document_Command (const char *cmd); | |||
138 | 136 | ||
139 | void openInDefaultBrowser_App (const iString *url); | 137 | void openInDefaultBrowser_App (const iString *url); |
140 | void revealPath_App (const iString *path); | 138 | void revealPath_App (const iString *path); |
139 | |||
140 | iMainWindow *mainWindow_App(void); | ||