From 999440cb9a577155258e31d625a0454ad7301952 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 16 Feb 2011 22:06:49 -0600 Subject: Adding a type for the text direction, putting it in a generic header for all --- libdbusmenu-glib/types.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 libdbusmenu-glib/types.h (limited to 'libdbusmenu-glib/types.h') diff --git a/libdbusmenu-glib/types.h b/libdbusmenu-glib/types.h new file mode 100644 index 0000000..f8ec6a4 --- /dev/null +++ b/libdbusmenu-glib/types.h @@ -0,0 +1,55 @@ +/* +Types that are used in several objects. + +Copyright 2011 Canonical Ltd. + +Authors: + Ted Gould + +This program is free software: you can redistribute it and/or modify it +under the terms of either or both of the following licenses: + +1) the GNU Lesser General Public License version 3, as published by the +Free Software Foundation; and/or +2) the GNU Lesser General Public License version 2.1, as published by +the Free Software Foundation. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranties of +MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR +PURPOSE. See the applicable version of the GNU Lesser General Public +License for more details. + +You should have received a copy of both the GNU Lesser General Public +License version 3 and version 2.1 along with this program. If not, see + +*/ + +#ifndef __DBUSMENU_TYPES_H__ +#define __DBUSMENU_TYPES_H__ + +#include + +G_BEGIN_DECLS + +/** + DbusmenuTextDirection: + @DBUSMENU_TEXT_DIRECTION_NONE: Unspecified text direction + @DBUSMENU_TEXT_DIRECTION_LTR: Left-to-right text direction + @DBUSMENU_TEXT_DIRECTION_RTL: Right-to-left text direction + + The direction of text that the strings that this server + will be sending strings as. +*/ +typedef enum _DbusmenuTextDirection DbusmenuTextDirection; +enum _DbusmenuServerTextDirection { /*< prefix=DBUSMENU >*/ + DBUSMENU_TEXT_DIRECTION_NONE, /*< nick=none >*/ + DBUSMENU_TEXT_DIRECTION_LTR, /*< nick=ltr >*/ + DBUSMENU_TEXT_DIRECTION_RTL /*< nick=rtl >*/ +}; + + +G_END_DECLS + +#endif /* __DBUSMENU_TYPES_H__ */ + -- cgit v1.2.3 From 52a86fa21af7177cd4adb71a1d5d034d30f91eaa Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 16 Feb 2011 22:51:33 -0600 Subject: Make sure the text direction isn't in the server --- libdbusmenu-glib/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libdbusmenu-glib/types.h') diff --git a/libdbusmenu-glib/types.h b/libdbusmenu-glib/types.h index f8ec6a4..aec8573 100644 --- a/libdbusmenu-glib/types.h +++ b/libdbusmenu-glib/types.h @@ -42,7 +42,7 @@ G_BEGIN_DECLS will be sending strings as. */ typedef enum _DbusmenuTextDirection DbusmenuTextDirection; -enum _DbusmenuServerTextDirection { /*< prefix=DBUSMENU >*/ +enum _DbusmenuTextDirection { /*< prefix=DBUSMENU >*/ DBUSMENU_TEXT_DIRECTION_NONE, /*< nick=none >*/ DBUSMENU_TEXT_DIRECTION_LTR, /*< nick=ltr >*/ DBUSMENU_TEXT_DIRECTION_RTL /*< nick=rtl >*/ -- cgit v1.2.3 From 093bb7435efaf19668a194d4fda5eae691e784eb Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 16 Feb 2011 22:55:41 -0600 Subject: Changing the definition style to make mkenums happy. --- libdbusmenu-glib/types.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libdbusmenu-glib/types.h') diff --git a/libdbusmenu-glib/types.h b/libdbusmenu-glib/types.h index aec8573..f6d8daf 100644 --- a/libdbusmenu-glib/types.h +++ b/libdbusmenu-glib/types.h @@ -41,12 +41,11 @@ G_BEGIN_DECLS The direction of text that the strings that this server will be sending strings as. */ -typedef enum _DbusmenuTextDirection DbusmenuTextDirection; -enum _DbusmenuTextDirection { /*< prefix=DBUSMENU >*/ +typedef enum { /*< prefix=DBUSMENU_TEXT_DIRECTION >*/ DBUSMENU_TEXT_DIRECTION_NONE, /*< nick=none >*/ DBUSMENU_TEXT_DIRECTION_LTR, /*< nick=ltr >*/ DBUSMENU_TEXT_DIRECTION_RTL /*< nick=rtl >*/ -}; +} DbusmenuTextDirection; G_END_DECLS -- cgit v1.2.3 From cf9662c5be75f9e7fe16e4fe9513ee3e4223fba0 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 18 Feb 2011 15:16:54 -0600 Subject: Adding in a status enum for tracking the status --- libdbusmenu-glib/types.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libdbusmenu-glib/types.h') diff --git a/libdbusmenu-glib/types.h b/libdbusmenu-glib/types.h index f6d8daf..e573476 100644 --- a/libdbusmenu-glib/types.h +++ b/libdbusmenu-glib/types.h @@ -47,6 +47,17 @@ typedef enum { /*< prefix=DBUSMENU_TEXT_DIRECTION >*/ DBUSMENU_TEXT_DIRECTION_RTL /*< nick=rtl >*/ } DbusmenuTextDirection; +/** + DbusmenuStatus: + @DBUSMENU_STATUS_NORMAL: Everything is normal + @DBUSMENU_STATUS_NOTICE: The menus should be shown at a higher priority + + Tracks how the menus should be presented to the user. +*/ +typedef enum { /*< prefix=DBUSMENU_STATUS >*/ + DBUSMENU_STATUS_NORMAL, /*< nick=normal >*/ + DBUSMENU_STATUS_NOTICE /*< nick=notice >*/ +} DbusmenuStatus; G_END_DECLS -- cgit v1.2.3