summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-07-10 19:27:12 +0000
committerDana Jansens <danakj@orodu.net>2003-07-10 19:27:12 +0000
commita95dc346fe7951dd48e41a41fcaafb6d872b0337 (patch)
tree099d79a095d6d7d8b5d2bd9a7f79350439a7266b /plugins
parent1ffc7fa9ec0ca76f8ffc23bba2c1f2d417732462 (diff)
prefix and capitalize ObMenu ObMenuEntry and ObMenuEntryRenderType
make the ObMenuEntryRenderType a standard enum instead bitflags
Diffstat (limited to 'plugins')
-rw-r--r--plugins/menu/client_menu.c28
-rw-r--r--plugins/menu/fifo_menu.c12
-rw-r--r--plugins/menu/timed_menu.c12
3 files changed, 26 insertions, 26 deletions
diff --git a/plugins/menu/client_menu.c b/plugins/menu/client_menu.c
index d4c94aad..31578d62 100644
--- a/plugins/menu/client_menu.c
+++ b/plugins/menu/client_menu.c
@@ -13,20 +13,20 @@
static char *PLUGIN_NAME = "client_menu";
#endif
-static Menu *send_to_menu;
-static Menu *layer_menu;
+static ObMenu *send_to_menu;
+static ObMenu *layer_menu;
typedef struct {
gint foo;
} Client_Menu_Data;
-#define CLIENT_MENU(m) ((Menu *)m)
-#define CLIENT_MENU_DATA(m) ((Client_Menu_Data *)((Menu *)m)->plugin_data)
+#define CLIENT_MENU(m) ((ObMenu *)m)
+#define CLIENT_MENU_DATA(m) ((Client_Menu_Data *)((ObMenu *)m)->plugin_data)
-void client_menu_clean_up(Menu *m) {
+void client_menu_clean_up(ObMenu *m) {
}
-void client_send_to_update(Menu *self)
+void client_send_to_update(ObMenu *self)
{
guint i = 0;
GList *it = self->entries;
@@ -36,7 +36,7 @@ void client_send_to_update(Menu *self)
if (i >= screen_num_desktops)
break;
if (strcmp(screen_desktop_names[i],
- ((MenuEntry *)it->data)->label) != 0)
+ ((ObMenuEntry *)it->data)->label) != 0)
break;
++i;
it = it->next;
@@ -46,7 +46,7 @@ void client_send_to_update(Menu *self)
menu_clear(self);
g_message("update");
for (i = 0; i < screen_num_desktops; ++i) {
- MenuEntry *e;
+ ObMenuEntry *e;
Action *a = action_from_string("sendtodesktop");
a->data.sendto.desk = i;
a->data.sendto.follow = FALSE;
@@ -59,7 +59,7 @@ void client_send_to_update(Menu *self)
}
#if 0
-void client_menu_show(Menu *self, int x, int y, Client *client)
+void client_menu_show(ObMenu *self, int x, int y, Client *client)
{
int newy;
g_assert(!self->invalid);
@@ -91,13 +91,13 @@ void plugin_setup_config() { }
void plugin_shutdown() { }
-void plugin_destroy (Menu *m)
+void plugin_destroy (ObMenu *m)
{
}
void *plugin_create() /* TODO: need config */
{
- Menu *m = menu_new_full(NULL, "client-menu", NULL,
+ ObMenu *m = menu_new_full(NULL, "client-menu", NULL,
/*client_menu_show*/NULL, NULL);
menu_add_entry(m, menu_entry_new_submenu("Send To Workspace",
send_to_menu));
@@ -136,8 +136,8 @@ void *plugin_create() /* TODO: need config */
void plugin_startup()
{
- Menu *t;
- /* create a Send To Workspace Menu */
+ ObMenu *t;
+ /* create a Send To Workspace ObMenu */
send_to_menu = menu_new_full(NULL, "send-to-workspace",
NULL, NULL, client_send_to_update);
@@ -149,6 +149,6 @@ void plugin_startup()
menu_add_entry(layer_menu, menu_entry_new("Bottom Layer",
action_from_string("sendtobottomlayer")));
- t = (Menu *)plugin_create("client_menu");
+ t = (ObMenu *)plugin_create("client_menu");
}
diff --git a/plugins/menu/fifo_menu.c b/plugins/menu/fifo_menu.c
index 8f4ac205..e5580b05 100644
--- a/plugins/menu/fifo_menu.c
+++ b/plugins/menu/fifo_menu.c
@@ -20,11 +20,11 @@ typedef struct Fifo_Menu_Data{
event_fd_handler *handler;
} Fifo_Menu_Data;
-#define FIFO_MENU(m) ((Menu *)m)
-#define FIFO_MENU_DATA(m) ((Fifo_Menu_Data *)((Menu *)m)->plugin_data)
+#define FIFO_MENU(m) ((ObMenu *)m)
+#define FIFO_MENU_DATA(m) ((Fifo_Menu_Data *)((ObMenu *)m)->plugin_data)
-void fifo_menu_clean_up(Menu *m) {
+void fifo_menu_clean_up(ObMenu *m) {
if (FIFO_MENU_DATA(m)->buf != NULL) {
g_free(FIFO_MENU_DATA(m)->buf);
FIFO_MENU_DATA(m)->buf = NULL;
@@ -43,7 +43,7 @@ void plugin_startup()
void plugin_shutdown() { }
void fifo_menu_handler(int fd, void *d) {
- Menu *menu = d;
+ ObMenu *menu = d;
char *tmpbuf = NULL;
unsigned long num_read;
#ifdef DEBUG
@@ -116,7 +116,7 @@ void fifo_menu_handler(int fd, void *d) {
}
}
-void plugin_destroy (Menu *m)
+void plugin_destroy (ObMenu *m)
{
fifo_menu_clean_up(m);
if (FIFO_MENU_DATA(m)->handler != NULL) {
@@ -141,7 +141,7 @@ void *plugin_create() /* TODO: need config */
event_fd_handler *h;
Fifo_Menu_Data *d = g_new(Fifo_Menu_Data, 1);
- Menu *m = menu_new("", PLUGIN_NAME, NULL);
+ ObMenu *m = menu_new("", PLUGIN_NAME, NULL);
d->fd = -1;
d->buf = NULL;
diff --git a/plugins/menu/timed_menu.c b/plugins/menu/timed_menu.c
index e7665b56..a6e2e8dd 100644
--- a/plugins/menu/timed_menu.c
+++ b/plugins/menu/timed_menu.c
@@ -15,8 +15,8 @@
#include "kernel/action.h"
#include "kernel/event.h"
-#define TIMED_MENU(m) ((Menu *)m)
-#define TIMED_MENU_DATA(m) ((Timed_Menu_Data *)((Menu *)m)->plugin_data)
+#define TIMED_MENU(m) ((ObMenu *)m)
+#define TIMED_MENU_DATA(m) ((Timed_Menu_Data *)((ObMenu *)m)->plugin_data)
static char *PLUGIN_NAME = "timed_menu";
typedef enum {
@@ -41,7 +41,7 @@ void plugin_startup()
{ }
void plugin_shutdown() { }
-void timed_menu_clean_up(Menu *m) {
+void timed_menu_clean_up(ObMenu *m) {
if (TIMED_MENU_DATA(m)->buf != NULL) {
fprintf(stderr, "%s", TIMED_MENU_DATA(m)->buf);
g_free(TIMED_MENU_DATA(m)->buf);
@@ -66,7 +66,7 @@ void timed_menu_clean_up(Menu *m) {
void timed_menu_read_pipe(int fd, void *d)
{
- Menu *menu = d;
+ ObMenu *menu = d;
char *tmpbuf = NULL;
unsigned long num_read;
#ifdef DEBUG
@@ -125,7 +125,7 @@ void timed_menu_read_pipe(int fd, void *d)
void timed_menu_timeout_handler(void *d)
{
- Menu *data = d;
+ ObMenu *data = d;
if (!data->shown && TIMED_MENU_DATA(data)->fd == -1) {
switch (TIMED_MENU_DATA(data)->type) {
case (TIMED_MENU_PIPE): {
@@ -187,7 +187,7 @@ void timed_menu_timeout_handler(void *d)
void *plugin_create()
{
Timed_Menu_Data *d = g_new(Timed_Menu_Data, 1);
- Menu *m = menu_new("", PLUGIN_NAME, NULL);
+ ObMenu *m = menu_new("", PLUGIN_NAME, NULL);
m->plugin = PLUGIN_NAME;