summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Davenport <DaveDavenport@users.noreply.github.com>2019-09-20 15:05:36 +0200
committerGitHub <noreply@github.com>2019-09-20 15:05:36 +0200
commit7c613f6a4ca4354165e2cab987d0db1e7ce32c5a (patch)
tree7cede72023c550462342a9eb13123580a6e5ddaa /include
parentf28cf0207e7641890617e8b946977dc204e05ce2 (diff)
Issue893: Add support for @media in the theme format. (#1015)
* [Lexer] Add support for @media. Issue: #893 * [Theme] @media limit to px. * [Theme@Media] add *{} support. * [Theme@Media] Add support for monitor-id media. * [Theme@Media] Code cleanup. * [Theme@Media] Add min/max-aspect-ratio. * [Theme@Media] Remove some debug output Fixes: #893
Diffstat (limited to 'include')
-rw-r--r--include/theme.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/theme.h b/include/theme.h
index 0a7c5fc3..2196887e 100644
--- a/include/theme.h
+++ b/include/theme.h
@@ -32,6 +32,24 @@
#include <widgets/widget.h>
#include "rofi-types.h"
+
+typedef enum {
+ THEME_MEDIA_TYPE_MIN_WIDTH,
+ THEME_MEDIA_TYPE_MAX_WIDTH,
+ THEME_MEDIA_TYPE_MIN_HEIGHT,
+ THEME_MEDIA_TYPE_MAX_HEIGHT,
+ THEME_MEDIA_TYPE_MON_ID,
+ THEME_MEDIA_TYPE_MIN_ASPECT_RATIO,
+ THEME_MEDIA_TYPE_MAX_ASPECT_RATIO,
+ THEME_MEDIA_TYPE_INVALID,
+} ThemeMediaType;
+
+
+typedef struct ThemeMedia {
+ ThemeMediaType type;
+ double value;
+} ThemeMedia;
+
/**
* ThemeWidget.
*/
@@ -43,6 +61,8 @@ typedef struct ThemeWidget
unsigned int num_widgets;
struct ThemeWidget **widgets;
+ ThemeMedia *media;
+
GHashTable *properties;
struct ThemeWidget *parent;
@@ -323,4 +343,11 @@ char *helper_get_theme_path ( const char *file );
* @returns full path to file.
*/
char * rofi_theme_parse_prepare_file ( const char *file, const char *parent_file );
+
+/**
+ * Process conditionals.
+ */
+void rofi_theme_parse_process_conditionals ( void );
+void rofi_theme_parse_merge_widgets ( ThemeWidget *parent, ThemeWidget *child );
+ThemeMediaType rofi_theme_parse_media_type ( const char *type );
#endif