marco 1.29.1
Window manager
Loading...
Searching...
No Matches
menu.c File Reference
View source
#include <config.h>
#include <glib/gi18n-lib.h>
#include <libmate-desktop/mate-image-menu-item.h>
#include <gdk/gdkx.h>
#include <stdio.h>
#include <string.h>
#include "menu.h"
#include "main.h"
#include "util.h"
#include "core.h"
#include "metaaccellabel.h"
#include "ui.h"
Include dependency graph for menu.c:

Data Structures

struct  _MenuItem
 
struct  _MenuData
 

Typedefs

typedef struct _MenuItem MenuItem
 
typedef struct _MenuData MenuData
 

Enumerations

enum  MetaMenuItemType {
  MENU_ITEM_SEPARATOR = 0 , MENU_ITEM_NORMAL , MENU_ITEM_IMAGE , MENU_ITEM_CHECKBOX ,
  MENU_ITEM_RADIOBUTTON , MENU_ITEM_WORKSPACE_LIST
}
 

Functions

static void activate_cb (GtkWidget *menuitem, gpointer data)
 
static void menu_closed (GtkMenu *widget, gpointer data)
 
static char * get_workspace_name_with_accel (Display *display, Window xroot, int index)
 
static GtkWidget * menu_item_new (MenuItem *menuitem, int workspace_id)
 
MetaWindowMenu * meta_window_menu_new (MetaFrames *frames, MetaMenuOp ops, MetaMenuOp insensitive, Window client_xwindow, unsigned long active_workspace, int n_workspaces, MetaWindowMenuFunc func, gpointer data)
 
void meta_window_menu_popup (MetaWindowMenu *menu, int root_x, int root_y, int button, guint32 timestamp)
 
void meta_window_menu_free (MetaWindowMenu *menu)
 

Variables

static MenuItem menuitems []
 

Typedef Documentation

◆ MenuData

typedef struct _MenuData MenuData

◆ MenuItem

typedef struct _MenuItem MenuItem

Enumeration Type Documentation

◆ MetaMenuItemType

Enumerator
MENU_ITEM_SEPARATOR 
MENU_ITEM_NORMAL 
MENU_ITEM_IMAGE 
MENU_ITEM_CHECKBOX 
MENU_ITEM_RADIOBUTTON 
MENU_ITEM_WORKSPACE_LIST 

Function Documentation

◆ activate_cb()

static void activate_cb ( GtkWidget *  menuitem,
gpointer  data 
)
static

References _MetaWindowMenu::client_xwindow, _MetaWindowMenu::data, _MetaWindowMenu::frames, _MetaWindowMenu::func, _MenuData::menu, meta_frames_notify_menu_hide(), and _MenuData::op.

Referenced by meta_window_menu_new().

Here is the call graph for this function:

◆ get_workspace_name_with_accel()

static char * get_workspace_name_with_accel ( Display *  display,
Window  xroot,
int  index 
)
static

References _, meta_core_get_workspace_name_with_index(), and NULL.

Referenced by meta_window_menu_new().

Here is the call graph for this function:

◆ menu_closed()

static void menu_closed ( GtkMenu *  widget,
gpointer  data 
)
static

References _MetaWindowMenu::client_xwindow, _MetaWindowMenu::data, _MetaWindowMenu::frames, _MetaWindowMenu::func, and meta_frames_notify_menu_hide().

Referenced by meta_window_menu_new().

Here is the call graph for this function:

◆ menu_item_new()

static GtkWidget * menu_item_new ( MenuItem *  menuitem,
int  workspace_id 
)
static

◆ meta_window_menu_free()

void meta_window_menu_free ( MetaWindowMenu *  menu)

◆ meta_window_menu_new()

MetaWindowMenu * meta_window_menu_new ( MetaFrames *  frames,
MetaMenuOp  ops,
MetaMenuOp  insensitive,
Window  client_xwindow,
unsigned long  active_workspace,
int  n_workspaces,
MetaWindowMenuFunc  func,
gpointer  data 
)

◆ meta_window_menu_popup()

void meta_window_menu_popup ( MetaWindowMenu *  menu,
int  root_x,
int  root_y,
int  button,
guint32  timestamp 
)

References _MetaWindowMenu::frames, _MetaWindowMenu::menu, META_UI_DIRECTION_RTL, meta_ui_get_direction(), meta_warning(), and NULL.

Referenced by meta_ui_window_menu_popup().

Here is the call graph for this function:

Variable Documentation

◆ menuitems

MenuItem menuitems[]
static

Referenced by meta_window_menu_new().