X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fframe.c;h=2064f304445ef6749621a7b88df023615a897c2d;hb=64dac07d07f37ec965ccc0b5bc8c8c789247cff0;hp=2976ca2f298e855c594c6755dced0241117d1590;hpb=8d19206866b70307aac5854ad267af285bb6d544;p=chaz%2Fopenbox 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 */