diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-04-05 17:22:01 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-04-05 17:22:01 +0000 |
| commit | bca8082d6d09a16a116c70001469a576b93157ce (patch) | |
| tree | 2e8c8bd22e8a1d5cdbdf3c4c20c7b5b78a4cf935 /openbox/frame.c | |
| parent | 831db744f4c023bd0478631a6050c394497bb2ea (diff) | |
use a context enum instead of quarks
Diffstat (limited to 'openbox/frame.c')
| -rw-r--r-- | openbox/frame.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/openbox/frame.c b/openbox/frame.c index 2976ca2f..2064f304 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -1,5 +1,40 @@ #include "frame.h" +Context frame_context_from_string(char *name) +{ + if (!g_ascii_strcasecmp("root", name)) + return Context_Root; + else if (!g_ascii_strcasecmp("client", name)) + return Context_Client; + else if (!g_ascii_strcasecmp("titlebar", name)) + return Context_Titlebar; + else if (!g_ascii_strcasecmp("handle", name)) + return Context_Handle; + else if (!g_ascii_strcasecmp("frame", name)) + return Context_Frame; + else if (!g_ascii_strcasecmp("blcorner", name)) + return Context_BLCorner; + else if (!g_ascii_strcasecmp("tlcorner", name)) + return Context_TLCorner; + else if (!g_ascii_strcasecmp("brcorner", name)) + return Context_BRCorner; + else if (!g_ascii_strcasecmp("trcorner", name)) + return Context_TRCorner; + else if (!g_ascii_strcasecmp("maximize", name)) + return Context_Maximize; + else if (!g_ascii_strcasecmp("alldesktops", name)) + return Context_AllDesktops; + else if (!g_ascii_strcasecmp("shade", name)) + return Context_Shade; + else if (!g_ascii_strcasecmp("iconify", name)) + return Context_Iconify; + else if (!g_ascii_strcasecmp("icon", name)) + return Context_Icon; + else if (!g_ascii_strcasecmp("close", name)) + return Context_Close; + return Context_None; +} + void frame_client_gravity(Frame *self, int *x, int *y) { /* horizontal */ |
