summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-30 15:29:46 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-30 15:29:46 (EDT)
commitdc5dd489e478b474741285d8b753fd5c789e2c51 (patch)
tree3b1e2c3e3d68c444f8d98dc25bb90d14f2fbed25 /src
parent6a4fb1c24d8bdb2c17ddb153c95f899f6bb339c4 (diff)
downloadmarquee-dc5dd489e478b474741285d8b753fd5c789e2c51.zip
marquee-dc5dd489e478b474741285d8b753fd5c789e2c51.tar.gz
marquee-dc5dd489e478b474741285d8b753fd5c789e2c51.tar.bz2
MqWebViewScheme: Convert to struct with anonymous union
Diffstat (limited to 'src')
-rw-r--r--src/web-view-schemes/schemes.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/web-view-schemes/schemes.h b/src/web-view-schemes/schemes.h
index e6f82d4..7ed7a0b 100644
--- a/src/web-view-schemes/schemes.h
+++ b/src/web-view-schemes/schemes.h
@@ -19,7 +19,7 @@
* along with Marquee. If not, see <http://www.gnu.org/licenses/>.
*/
-typedef union _MqWebViewScheme MqWebViewScheme;
+typedef struct _MqWebViewScheme MqWebViewScheme;
#ifndef MQ_WEB_VIEW_SCHEMES_H
#define MQ_WEB_VIEW_SCHEMES_H
@@ -43,14 +43,17 @@ typedef struct {
const gchar *uri;
} MqWebViewViewSourceScheme;
-union _MqWebViewScheme {
- MqWebViewNormalScheme normal;
- MqWebViewViewSourceScheme view_source;
+struct _MqWebViewScheme {
+ union { /* C11: Anonymous union whose members are accessed directly */
+ MqWebViewNormalScheme normal;
+ MqWebViewViewSourceScheme view_source;
+ };
};
typedef struct {
gboolean (*match_uri) (const gchar *uri);
void (*initialize) (MqWebView *, MqWebViewScheme *, const gchar *);
+ gboolean (*ready) (MqWebView *, MqWebViewScheme *);
void (*finalize) (MqWebViewScheme *);
gchar * (*rewrite_uri) (MqWebView *, MqWebViewScheme *, const gchar *);
gchar * (*display_uri) (MqWebView *, MqWebViewScheme *, const gchar *);