File: plugin-sample1.c

package info (click to toggle)
anjuta 1.2.2-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 24,732 kB
  • ctags: 12,398
  • sloc: ansic: 82,587; cpp: 35,104; sh: 8,591; xml: 7,210; makefile: 981; python: 157
file content (65 lines) | stat: -rw-r--r-- 1,414 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include "../../src/anjuta.h"
#include "../../src/anjuta_info.h"
#include "../../src/anjuta-plugins.h"

gchar   *GetDescr       (void);
glong    GetVersion     (void);
gboolean Init           (GModule *self, void **pUserData, AnjutaApp* p);
void     CleanUp        (GModule *self, void *pUserData, AnjutaApp* p);
void     Activate       (GModule *self, void *pUserData, AnjutaApp* p);
gchar * GetMenu         (void);
gchar   *GetMenuTitle   (GModule *self, void *pUserData);
gchar   *GetTooltipText (GModule *self, void *pUserData);

/* Get module description */
gchar *
GetDescr()
{
	return g_strdup(_("Sample Plugin Description. Holla!"));
}
	/* GetModule Version hi/low word 1.02 0x10002 */
glong
GetVersion()
{
	return 0x10000L ;
}

/* Place this entry under the 'View' menu */
gchar *
GetMenu()
{
	return g_strdup("view");
}

gboolean
Init( GModule *self, void **pUserData, AnjutaApp* p )
{
	return TRUE ;
}

void
CleanUp( GModule *self, void *pUserData, AnjutaApp* p )
{
}

void
Activate( GModule *self, void *pUserData, AnjutaApp* p)
{
	GList* mesg = NULL;
	mesg = g_list_append (mesg, _("Hello world!"));
	mesg = g_list_append (mesg, _("Sample plugin!"));
	
	anjuta_info_show_list (mesg, 0, 0);
}

gchar
*GetMenuTitle( GModule *self, void *pUserData )
{
	return g_strdup(_("Sample plugin"));
}

gchar
*GetTooltipText( GModule *self, void *pUserData ) 
{
   return g_strdup(_("This is a sample plugin"));
}